News for hackers. Stuff that matters.
Re:How the most popular Chrome extensions affect browser per... by crazygringo on Tuesday June 16, 2020 @09:38AM (#23538979)
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 potentially highly misleading, because CPU time isn't something the user directly observes -- it might be the limiting factor, or it might not affect the user experience at all (because the CPU usage is happening while waiting for further network resources that are even slower, or the CPU usage is happening after the page has visually finished loading all relevant content).

I'd be much more interested to see how extensions like Evernote or LastPass increase the time it takes for a real webpage (e.g. "nytimes.com") to finish painting the viewport not including ads, and similarly whether adblocking actually decreases the same -- or if all the advertising stuff really only happens afterwards. (Because sites are architected differently, you'd need to compute an aggregate score across a range of common sites.)

Re:How the most popular Chrome extensions affect browser per... by mostlystatic on Tuesday June 16, 2020 @11:15AM (#23540112)
Good point about extension code running while rendering is still blocked by the network. That should prevent any user-facing delay.

I just ran a few quick tests with the Top 50 extensions and an NYT article. The charts are ordered by largest median metric value.

https://gist.github.com/mattzeunert/de3c8aedd2936a34eeb88b62...

The Largest Contentful Paint (LCP) chart suggests an interesting phenomenon. Extensions like Dashlane and Evernote appear to slightly increase when that paint happens. These extensions load a large amount of code, but don't block the initial render.

Grammarly does not seem to push up LCP much. Its JS code runs before the page starts rendering, so maybe it is less likely to compete with other code later on.

Normally running code before the page renders would be bad, but if the page is network-constrained at that point it might soften the impact.

Re:How the most popular Chrome extensions affect browser per... by crazygringo on Tuesday June 16, 2020 @11:30AM (#23540320)
Thanks. Very impressed not only that you took the effort to run those, but also at how quickly you responded and were able to run, collect and publish results! Major kudos.
Re:How the most popular Chrome extensions affect browser per... by notRobot on Tuesday June 16, 2020 @10:57AM (#23539873)
Just to clarify to readers who aren't aware, you should be using uBlock Origin and not uBlock.org: https://en.m.wikipedia.org/wiki/UBlock_Origin
Re:How the most popular Chrome extensions affect browser per... by sa46 on Tuesday June 16, 2020 @01:54PM (#23542000)
> 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 interested to see how extensions like Evernote or LastPass increase the time it takes for a real webpage (e.g. "nytimes.com") to finish painting the viewport not including ads.

I reinstalled Lastpass to test on nytimes.com. It takes 58ms to evaluate onloadwff.js (the Lastpass entry point) before any content is rendered.

Re:How the most popular Chrome extensions affect browser per... by DaiPlusPlus on Tuesday June 16, 2020 @07:21PM (#23545556)
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 per... by tim333 on Wednesday June 17, 2020 @07:46AM (#23550270)
I switched to Bitwarden for similar reasons. Seems ok though I haven't checked the latency.
Re:How the most popular Chrome extensions affect browser per... by cridenour on Tuesday June 16, 2020 @12:20PM (#23540954)
I was surprised by the choice of WCPO, which to me is a local news station who owns WCPO.com. Does it mean something else I'm not aware of or are they famous for being slow?
Re:How the most popular Chrome extensions affect browser per... by mostlystatic on Tuesday June 16, 2020 @12:46PM (#23541230)
Local news sites tend to be extremely slow and ad-heavy in my experience. So I thought of a medium-sized US city, searched for "Cincinnati news" and picked the top result.

I found what I was looking for, this is the article I ran the tests on: https://www.wcpo.com/news/education/higher-education/miami-u...

Re:How the most popular Chrome extensions affect browser per... by cridenour on Tuesday June 16, 2020 @03:09PM (#23542874)
Ah that explains it. Thanks!
Re:How the most popular Chrome extensions affect browser per... by zerocrates on Tuesday June 16, 2020 @04:14PM (#23543512)
> CPU usage is happening after the page has visually finished loading all relevant content

This can be very noticeable though, leading to sluggishness, stuttering scrolling, slowing down other tasks, increasing fan noise on laptops. uBO in my anecdotal experience may almost make a bigger positive impact in this fashion than simply at the initial render.

Re:How the most popular Chrome extensions affect browser per... by gizmodo59 on Tuesday June 16, 2020 @09:48AM (#23539063)
In mac, there is sort by energy usage in activity monitor and Chrome always takes the top spot (at least for me).
Re:How the most popular Chrome extensions affect browser per... by mercer on Tuesday June 16, 2020 @11:06AM (#23539988)
I've been in power/battery-constrained situations and it's crazy how much Chrome drains my battery compared to Safari. I still use it when I'm sure I'll be able to charge soon, but I've gone as far as converting some of my home-made extensions to Safari for situations where I need to conserve what I can.
Re:How the most popular Chrome extensions affect browser per... by catalogia on Tuesday June 16, 2020 @10:35AM (#23539587)
Besides energy usage reported by the activity monitor, there is also the matter of how long the a user can stay on battery power. For laptop users, energy usage can be a huge deal for their overall satisfaction, even if the user isn't quite sure where they're gaining or losing anything.
Re:How the most popular Chrome extensions affect browser per... by chromeinternalz on Tuesday June 16, 2020 @10:01AM (#23539226)
The reason - Safari can delegate to linked in code that is allowed to take advantage of powersaving hooks in the OS, whereas, Chrome does the following: 1. Contact Google 2. Start to load page 3. Contact Google 4. Continue load page 5. Send more stuff to the big G 6. Maybe finish loading page 7. Why not send more stuff to Google