Repository navigation
Fixed
-
Fix quadratic-time parsing of unbalanced tags in the built-in "mochiweb" parser.
For every end tag the parser scanned the entire stack of open elements, so malformed input with a deep stack of never-closed tags followed by many non-matching end tags took
O(open_depth x end_tags)time.
The parser now tracks the names of open elements and rejects a non-matching end tag without scanning the stack, making parsing linear again.
The resulting parse tree is unchanged. -
Optimize functional selector matching.
Instead of generating
an+bvalues until one matches, solve the formula directly with bounds and a remainder check.
This turns each match from a stream scan intoO(1)arithmetic.
Pull requests
- Optimize functional selector matching by @preciz in #705
- Fix quadratic parsing of unbalanced tags in the Mochiweb parser by @bmalum in #707
- Update hex packages by @philss in #708
- Release v0.38.5 by @philss in #709
New Contributors
Full Changelog: v0.38.4...v0.38.5