> The Avira Browser Safety extension contains a website allowlist with 30k+ regular expressions. When the user navigates to a new page Avira checks if the page URL is in that allowlist I wonder who thought that would be a good idea... Sounds like something that could be significantly improved by compiling all patterns into a single statemachine.
How the most popular Chrome extensions affect browser performance
111–120 of 136 posts
Re: How the most popular Chrome extensions affect browser performance
#112> The Avira Browser Safety extension contains a website allowlist with 30k+ regular expressions. When the user navigates to a new page Avira checks if the page URL is in that allowlist I wonder who thought that would be a good idea... Sounds like something that could be significantly improved by compiling all patterns into a single statemachine.
Re: How the most popular Chrome extensions affect browser performance
#113> "DDG Privacy Essentials does a simple object property lookup based on the request domain, an operation that is practically instantaneous" This sounds interesting. A bit of searching is not providing much enlightenment - anyone care to explain in a bit more detail? Also, if it is so fast, why aren't all the filter add-ons doing it?
It is a deep dive into how modern content blockers work and what kind of rules they have to enforce (they are usually much more complex than simple domains, though).
As a side node, I recently ran a small experiment and found out that around 90% or blocking from Easylist/EasyPrivacy/uBO lists can be done based on domain information only. But of course this leaves a lot of corner cases where sites might break or ads might still show, and ultimately more granularity is needed to address these cases.
Re: How the most popular Chrome extensions affect browser performance
#114If the author is here, can I suggest testing the Dark Reader extension too?
I also briefly mention it in the section on FCP, explaining why it makes sense for the extension to use render-blocking content scripts. https://www.debugbear.com/blog/2020-chrome-extension-perform...
Re: How the most popular Chrome extensions affect browser performance
#115Re: How the most popular Chrome extensions affect browser performance
#116It's entertaining that there is yet another area where "running large numbers of regular expressions, known in advance and not changing all that often" over lots of input is performance critical. This was a key driver behind writing Hyperscan ( https://github.com/intel/hyperscan ) which I used to work on when it was primarily used for network security (thousands or tens of thousands of regular expression rules for fi…
Re: How the most popular Chrome extensions affect browser performance
#117It looks like a lot of the slowness from the slow extensions is from parsing and executing JavaScript. Are there opportunities from the browser side to make extensions faster? It seems like re-parsing the same JS on every pageload is an opportunity for gains from caching, but I'm also wondering about different delivery mechanisms like wasm. Are there security considerations here?
Re: How the most popular Chrome extensions affect browser performance
#118Earlier quoted context omitted.
Resetting chrome isn't much of a solution if the underlying problem is botnet affiliation (trojan, rootkit, etc). Should be reasonably easy to shut down all applications and services, and inspect the traffic going through the router for suspicious domains. If you only have a windows machine connected there should only be Microsoft traffic and maybe the router manufacturer. Anything else, and it's probably malicious.
Inspecting your PC's traffic from a sniffer on your PC to find a rootkit seems like a fool's errand. If something has driver / kernel level privileges it can trivially hide such traffic from any sniffer you have running.
Re: How the most popular Chrome extensions affect browser performance
#119Utterly fascinating article. The main takeaways seem to be that 1) extensions in general wind up massively increasing CPU time (by 5-20x) when loading "example.com", and 2) ad blockers wind up massively reducing CPU time (by 4-20x) when loading a "WCPO news article". Which makes me happy that I use uBlock (edit: Origin, thanks below), and sad that I have to use LastPass. HOWEVER -- I feel like both these metrics are…
> I have to use LastPass. I recently switched from LastPass to 1Password because of the added latency from Lastpass. Lastpass adds about 70ms to first contentful paint on example.com. 1Password, on the other hand, runs after the painting is done so it doesn't block rendering. I polished up a blog draft I had lying around about switching to 1Password: https://joe.schafer.dev/passing-lastpass/ > I'd be much more intere…
Re: How the most popular Chrome extensions affect browser performance
#120> The Avira Browser Safety extension contains a website allowlist with 30k+ regular expressions. When the user navigates to a new page Avira checks if the page URL is in that allowlist I wonder who thought that would be a good idea... Sounds like something that could be significantly improved by compiling all patterns into a single statemachine.
Yeah, back when I was doing similar matching on a big bunch of regexes, it was vastly faster to match on all of them lumped together in a group with the ‘or’ operator. And I learned of this more than fifteen years ago from a server-side lib that deduced the exact browser from the user-agent: it had a huge regex with various placeholders and a long list of ‘if/elseif’ checks to extract the values.