Skip to content

v0.38.5

Latest

Choose a tag to compare

@philss philss released this 29 Oct 14:49
· 1 commit to main since this release
7786ce9

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+b values until one matches, solve the formula directly with bounds and a remainder check.
    This turns each match from a stream scan into O(1) arithmetic.

Pull requests

New Contributors

Full Changelog: v0.38.4...v0.38.5