Files
cpython/Lib/html
Serhiy StorchakaandClaude Opus 4.8 1e7956f1a7 [3.10] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031) (#153043)
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 bcf98ddbc4)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-10 20:53:50 +01:00
..