cloudflare / lol-html

Low output latency streaming HTML parser/rewriter with CSS selector-based API
https://crates.io/crates/lol-html
BSD 3-Clause "New" or "Revised" License
1.47k stars 82 forks source link

Removed RefCells for dispatcher. #220

Closed orium closed 2 months ago

orium commented 2 months ago

We now explicitly pass that state around. This will reduce the number of Mutexes in a Send version of the rewriter.

Benchmarks show a median speedup of 0.4%... so, no performance difference when all benchmarks are aggregated.