mirror of
https://github.com/python/cpython
synced 2026-10-23 07:34:49 +03:00
gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031)
When an unterminated construct (e.g. a tag or comment) spanned many
feed() calls, rescanning the growing buffer and concatenating new data
onto it were both quadratic. New data is now accumulated in a list and
only joined and parsed once enough has piled up.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| entities.py | ||
| parser.py | ||