4 ms·
In Min, it's still javascript[1]. Also, by the look of it, the current implementation in Min is very inefficient: for every network request, all the filters wi
by gorhill 11y ago
In Min, it's still javascript[1].
Also, by the look of it, the current implementation in Min is very inefficient: for every network request, all the filters will be evaluated to check for a match.
Statistically, on average the majority of network requests are no match, and in the current implementation, no match means having iterated through all the filters, thus a significant overhead added to every single network request.
Furthermore, the evaluation of wildcard-based filters is itself quite inefficient: every time a wildcard-based filter is evaluated, an array of substrings is created and discarded.
[1] https://github.com/PalmerAL/min/blob/master/ext/abp-filter-parser-modified/abp-filter-parser.js https://github.com/PalmerAL/min/blob/master/ext/abp-filter-p...
- minbrowser 11y agoThanks for the suggestions! How does uBlock avoid checking every filter? It looks like it splits filters into buckets, and only checks one bucket of filters, but I'm not understanding how the filters are split up.