Live data from Hacker News

How the most popular Chrome extensions affect browser performance

debugbear.com

121–130 of 136 posts

Re: How the most popular Chrome extensions affect browser performance

#121
post #98

Utterly 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…

I have LastPass, but I keep it in “only activate extension when I click on the toolbar button”.

The only annoying thing is that LastPass requires the whole page to reload first - I don’t know why Chrome can’t load an extension into an already-loaded page.

Re: How the most popular Chrome extensions affect browser performance

#122
post #12

Most ad blockers work by blocking certain network requests that are initiated by the page. DDG Privacy Essentials reduces the number of network requests by 95% and the download weight by 80%. DuckDuckGo Privacy Essentials reduces the CPU time of the article page from 31s to just 1.6s. All other tested extensions also bring CPU time down to at most 10s. It seems the single most important thing regarding Real Word Perf…

Because a web browser should be fundamentally neutral by default. All content should get rendered the same way, regardless of which server or domain it comes from.

That doesn't preclude the browser from making choices to protect privacy and security, but all sites should be treated equally (as Safari does with its tracking protection, for instance).

Re: How the most popular Chrome extensions affect browser performance

#124

It seems like the included pw managers like LastPass & Dashlane also impact page loading drastically. Is there even an alternative with less impact?

I recently switched to Enpass after LastPass started having major issues in both Firefox and Chrome. I was having to remove and reinstall it at least once per week.

Enpass has been great. The setup with Dropbox sync isn’t as quick but that’s just one per device. It’s very speedy and hasn’t gotten in the way at all.

Re: How the most popular Chrome extensions affect browser performance

#125
post #116

It'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…

This is indeed a performance critical problem, but it is already pretty much solved at this point. If you look at the performance of the most popular content blockers, their decision time is already below fractions of milliseconds. So it does not seem like performance is really an issue anymore.

Yeah, I don't doubt that it's solvable by other means (notably hashing). It's just amusing that something we started building in 2006 - and open sourced in 2015 - largely solves a problem directly (i.e. you don't specifically have to rewrite your regexes).

Re: How the most popular Chrome extensions affect browser performance

#126

This is a worthy research topic. On mobile, with slower networks and much worse CPUs, uBlock often completely changes the experience. (thanks Mozilla!) I would note though that only example.com was examined (and apple.com in one test). I also did not see information if tests were repeated, as no variance/stddev is given. I'd expect it to be pretty high.

How are you installing Firefox extensions in mobile? Is it Android only?

Worth a read “Explanation of the state of uBlock Origin (and other blockers) for Safari” — https://github.com/el1t/uBlock-Safari/issues/158

Re: How the most popular Chrome extensions affect browser performance

#127
post #116

Earlier quoted context omitted.

This is indeed a performance critical problem, but it is already pretty much solved at this point. If you look at the performance of the most popular content blockers, their decision time is already below fractions of milliseconds. So it does not seem like performance is really an issue anymore.

Yeah, I don't doubt that it's solvable by other means (notably hashing). It's just amusing that something we started building in 2006 - and open sourced in 2015 - largely solves a problem directly (i.e. you don't specifically have to rewrite your regexes).

To be fair, blocklists are not really lists of regexps. They contain some regexps indeed but the syntax is mostly custom and matching relies on both patterns found in URLs (This part could be partially expressed as RegExps) as well as a multitude of other things like constraints on domain of the frame, domain of the request, type of network request, etc.

Re: How the most popular Chrome extensions affect browser performance

#128

Great research! I'm a user of evernote web clipper and seeing that they're adding 3mb to every page that I'm using is extremely discouraging. My browse to clip ratio is around 1000:1 and I'm probably removing the extension after this. Just wondering, can browser extensions codesplit their bundles? If it's possible, then it is really disappointing to see these large companies loading huge bundles on initial load.

Nothing stopping them from doing code splitting. Most extensions just modify the dom to insert script tag(s). So the performance strategies are the same as any other frontend app.

Re: How the most popular Chrome extensions affect browser performance

#129
post #95
post #12

Most ad blockers work by blocking certain network requests that are initiated by the page. DDG Privacy Essentials reduces the number of network requests by 95% and the download weight by 80%. DuckDuckGo Privacy Essentials reduces the CPU time of the article page from 31s to just 1.6s. All other tested extensions also bring CPU time down to at most 10s. It seems the single most important thing regarding Real Word Perf…

Aggressive content blockers also tend to break websites. Not big sites like Washington Post for very long, but all sorts of small sites and in confusing ways. For example, we had to rearchitect part of our site that was talking about marketing and advertising because various ad blockers decide any url pattern with '/advertising/' shouldn't be loaded.

We had to rename our cookie police modal so unlock users could get into our app.

Re: How the most popular Chrome extensions affect browser performance

#130
post #12

Most ad blockers work by blocking certain network requests that are initiated by the page. DDG Privacy Essentials reduces the number of network requests by 95% and the download weight by 80%. DuckDuckGo Privacy Essentials reduces the CPU time of the article page from 31s to just 1.6s. All other tested extensions also bring CPU time down to at most 10s. It seems the single most important thing regarding Real Word Perf…

Because a web browser should be fundamentally neutral by default. All content should get rendered the same way, regardless of which server or domain it comes from. That doesn't preclude the browser from making choices to protect privacy and security, but all sites should be treated equally (as Safari does with its tracking protection, for instance).

I don't think I agree with that. Do you want spam treated the same as your regular email for example? It is up to the implementation to decide what is {spy|mal|track|junk}ware.

The reverse is also problematic, sites treat browsers (or even user agents) very differently. Why should browsers not do the same?

Post reply on HN