2 ms·
20K rules probably isn't that big, when you compile that to an automata. Most nodes are probably behind the edges that never traversed. If there would be an op
by drdaeman 12y ago
20K rules probably isn't that big, when you compile that to an automata. Most nodes are probably behind the edges that never traversed.
If there would be an option for a extension to hook into DOM element creation (i.e. when browser parses HTML and builds a tree, it'd call some user-defined predicate function) - that would possibly solve the issue.
I believe CSS is slow because of cascading nature - it requires re-compiling it from the very plaintext source on every page view, to combine ad-blocking rules with others - this certainly could be optimized (if browser side would provide tools for that). No idea about horrendous memory usage, though.