back
152 comments
I think that browser developers are optimizing the wrong thing. Specifically: they optimize for execution speed while they better optimize for minimum memory usage instead. Let me explain why this is more important.

Let's say I am visiting a properly made website and it takes 10% of CPU to render. Even if browser devs make their browser twice faster, it will only save 5% of CPU time - and that would be completely unnoticeable. You might ask, what about modern websites, built with D*t compiled to webassembly, GPU acceleration, reactive frameworks, material design and capable to load the multi-core CPU at 100%? I am not using such sites so I don't care.

Now let's look at memory usage. Optimizing for speed usually causes increased memory consumption, and this increases the chance of invoking swapping. If the system starts swapping, it becomes orders of magnitude slower. No speed optimizations will matter in this case.

Therefore if you are targeting wide audience, and not only mac users, then you should be optimizing for memory usage. If the browser could use two times less memory while using twice amount of CPU time that would be perfect. Just think how many laptops with 2 or 4 Gb of RAM would become usable again.

> I think that browser developers are optimizing the wrong thing.

> You might ask, what about modern websites [...] I am not using such sites so I don't care.

They might be optimizing the wrong thing for you, but the majority do use "modern sites"

> You might ask, what about modern websites, built with D*t compiled to webassembly, GPU acceleration, reactive frameworks, material design and capable to load the multi-core CPU at 100%? I am not using such sites so I don't care.

Does this just mean that browser developers are optimizing for the right thing, just not something that benefits you? Tons of people use these sites.

> If the system starts swapping, it becomes orders of magnitude slower.

Not really. Browsers try to keep stuff in swap that they probably won't need. Swapping doesn't become a problem until you're almost out of memory as well, and then you might get thrashing. But there's a wide range where CPU optimizations make sense. And such a large fraction of people have SSDs that even swap access can be pretty fast.

There are over 3B devices using Chrome as browser. 2.5B of them are either on Laptop, Smartphone or Tablet. Average Opened Tabs is still under 5.

As much as I want them to optimise for memory usage. Taking less CPU time for rendering is extremely important for battery.

Not to mention faster site is noticeable. And that is what sells. Chrome was faster than everything else when it launched. ( May be apart from Opera )

Well all know what the "solution" here is: to have multiple browser vendors, each optimising for something else. Imagine having a lightweight browser ran a bit slower but could run on a potato with 512MB or RAM. Or one that optimises for viewing static documents (you know - websites) and so uses barely any CPU when idle, but might not support all the crazy JS features.

Of course, having turned browsers into virtual machines, there isn't much specialisation that can be done without breaking things. Might it be time to create a subset of features that sites could limit themselves to and allow browsers to use a simpler and faster render pipeline? You know, like what we thought AMP was going to be before it turned out to have Google's monopolistic shit smeared all over it.

The laptops with 2 or 4 Gb of RAM (e.g. Chromebooks) are also likely to have Celeron or MediaTek CPUs which might struggle much more than that, also unless you have multiple tabs open 4GB of RAM might not be that bad.

And given a choice between being able to open several tabs all of which are barely functional and being stuck on a single website at at time which runs smoothly I'd definitely choose the later (of course the tradeoff is probably not as straightforward, then again it's not completely obvious to me that optimizing for speed would necessarily result in higher memory consumption).

IMO even if they are optimizing for Macs, I'm not sure this approach would make sense (assuming the tradeoff between CPU performance and RAM usage exists) since they are much more likely to have less memory and better CPUs than PC laptops (e.g. you can probably easily get a Windows laptops with 32GB for $1000 or less).

The reason for the focus on CPU time is that it has the larger impact on battery life.
If you improve CPU performance, you can compress memory with the leftover cycles. This is what I do on my RPi which allows me to run quite a few memory hungry processes at the cost of some CPU (which is fine, because those processes are mostly idle).
> Optimizing for speed usually causes increased memory consumption,

Lol, no?

If your benchmark is memory bound, reducing memory usage is probably the simplest way to make it faster.

I agree 100% -- and, as a front-end developer for more than half the time I've been writing code for web applications since 1995, I think my opinion should matter. I've seen the trends and can relate to exactly this point. Well-stated and, frankly, late to the public eye (but, that's my fault since I should've written something similar years ago).
Man, that math did not make any sense at all. A program can't use 10% of the CPU. It either uses the CPU or it doesn't. If a page renders with "5% CPU" measured over some interval that means it rendered twice as quickly, which is a substantial improvement.
They optimised mostly for startup time, not execution speed.

Java for example uses runtime VM information before it starts compiling classes to machine code. That means it's faster in the long run, but requires a 'warm up time'. Obviously a bit better for server side.

Use tabsuspender for that. It saves memory by suspending the tabs which is not used for quite some time.
... and some of us disable swap to prolong laptop-motherboard-soldered-SSD lifetime, and Windows 10 regularly bluescreens when memory is exhausted and swap is disabled.
I disagree. Memory is cheap. Battery life isn't.
There are certainly lots of situations where one browser beats another

For example in this microbenchmark, Chrome is 10x slower than both FF and Safari at one method.

https://jsbenchit.org/?src=cfcb916dd03df45952183e6484a14344

Here's another where in one case Firefox is 54x faster than Chrome

https://jsbenchit.org/?src=beb26575ad78caa99a2a8c45ce2b780f

Here's a conundrum. Fabrice Bellard's QuickJS engine takes 3 minutes to run the test262 ECMAScript conformance suite. d8 takes 37 minutes to run test262 according to https://medium.com/compilers/testing-the-v8-javascript-engin... and it crashes for me in Chrome https://v8.github.io/test262/website/default.html Has anyone else observed this performance disparity? Could it really be possible that a JavaScript engine written by one guy is 10x faster for everyday code than the flagship product of a flagship company? Because if that's the case it'd make Fabrice Bellard the Han Solo of programmers.
https://jsbench.github.io/#b39045cacae8d8c4a3ec044e538533dc

Look at DOM performance. Chrome has a ceiling of about 45m ops/s where FF max speed is dependent upon your ram and bus speed reaching beyond 4-5b ops/s. In both though querySelectors perform at about the same speeds as slow as 25000 ops/s.

I have written an OS GUI that executes in the browser. It loads, including full state restoration in about 120ms. I was recently interviewing with a search engine company, one of the big ones, where I could demonstrate that JavaScript tool can execute file system search much faster than the OS and produce better results. They seemed really impressed.

Despite all of this my biggest learning about performance is that mentioning performance during job interviews shows that you are incompatible with other JavaScript developers and will not be hired.

the color palette on the site is really weird. it took me 5 minutes to see the browser names :D
Be curious to try Chrome again, but for a long time it’s felt bloated and slow. Been very happy with Safari, and particularly love the 2FA integration.

My biggest gripe is the lack of shared bookmarks and passwords between browsers. There are 3rd party extensions and what not to do some of this (eg 1password), but nothing beats the UX of true browser integration. I wish there was a single standard with pluggable backends so I had no switching costs. Quite frankly I’m surprised Firefox doesn’t just use the Mac keychain and share bookmarks with Safari in order to gain market share.

My Speedometer results on an M1 Mac are:

- Chrome v99: 204

- Safari: 266

How come I fall so far short of the post's advertised fastest-of-any-browser 300?

Edit: Running in incognito got me a 251, so some of the slowdown must be from extensions.

Edit 2: Seems like 1password and uBlock Origin decrease the score by around 30 each, I got a 276 with both disabled.

Chrome starts with different options for different users to try out new features. They state which features they ran the benchmarks with in the fine print below the article:

"Data source for Mac statistics: Speedometer 2.0 comparing Chrome 99.0.4812.0 --enable-features=CanvasOopRasterization --use-cmd-decoder=passthrough "

M1Pro

Chrome v98: 290 Chrome v99: 316 Safari : 278

All were with incognito/private browsing to remove the effect of extensions

I have a friend who says: "when you invent more efficient lightbulbs, people do not consume less energy, they just get more light"

Every time we did a milestone performance improvement in our infrastructure, e.g. search used to take few seconds, we reduced it to few milliseconds. One year later our colleagues were doing machinegun-like queries and the search was back to take 1 second, and it is just a matter of time to go back to few seconds.

One thing that helped a lot was hard limits, e.g. InternetExplorer9 having hard cap on css size was literally the only thing that forced people not to push megabytes of css.

I wish Chrome does something similar, like 'you cant have more than 500kb of js code evaluated per page' or 'no more than 200kb css', it will do miracles in just one year, and I am willing to bet that we will have the same features we would without the limit.

EDIT: I did not mean to undervalue Chrome's 49% improvement in one year, which is just extraordinary work!

Cool to hear that Chrome is faster than Safari, but that's not why I'm going to stick with Safari.

I use Safari because of Chrome's memory bloat, Safari's text message MFA auto-fill features, and Safari's cross-platform (iOS/macOS) password manager.

In the case of the MotionMark benchmark (more graphics/rendering focused), I have Safari beating Chrome's score by more than double (2703 vs 1152) on my M1 Max machine. Now I don't think Safari is 2x as fast as Chrome per se but it does explain how these speedometer tests can be so "close" yet Safari still feels faster.

EDIT: Firefox gets a 1336

I'm a little confused as to what the actual milestone is here? "We got 13% faster vs our last build" is just... well.. every day. I thought there was going to be some specific metric that they beat. It's good that browsers get faster at specific benchmarks, but what we basically always see is that the web gets more complex whilst browsers get faster (this is just an extension of the effect where software gets more complex as hardware gets faster and therefore the software you're using at any given time basically stays the same speed).

However, and I think this is important to bring up, browsers are basically the same speed and the reason to use one over the other is largely down to ergonomics and larger concerns. On the "larger concerns" side, Chrome is a failure. Chrome exists so the advertising company Google can track you and sell you targetted ads. It can do this in reasonable ways and it can do this in unreasonable ways, and with attacks on privacy like FLoC. Chrome is doing exactly what Internet Explorer was doing for microsoft in the 2000s and I think it's appropriate to call out that fact.

I’m glad perf is still a focus for the Chrome team. That said…

> We know that benchmarks are just one of many ways of measuring the speed of a browser.

This is very true, and with a few notable exceptions my experience is that Safari feels faster across the board even where it has consistently benched slower. This likely has less to do with runtime performance and more to do with process isolation models. I feel confident about that because Safari tends to be more liberal with spawning new processes, and that’s where I experience its pathological edge cases.

(Chrome starts to pool processes by domain sooner than Safari, which puts less pressure on the OS but more on operations within a given domain; Safari creates processes per tab more consistently but ultimately degrades overall app performance and eventually system performance too.)

> Nothing is more frustrating than having a slow experience while browsing the web.

Really?

I think many people "around the world" have more pressing issues than saving a couple of milliseconds while "shopping for a new pair of headphones".

Especially when everyone knows the real speed bump across all browsers, devices and OSes is to aggressively filter out ads, something Chrome is actively fighting with Manifest V3.

Former champion Safari has been dog slow since v15. My benchmark https://youtu.be/5yCXPCVvUBY
I'm guessing there was renewed urgency for responsiveness due to 120fps displays on M1 mac's - which made lower frame rates compared to Safari more noticeable.
"Nothing is more frustrating than having a slow experience while browsing the web"

^ I stopped reading at this point, because I realised that this is something that only someone on a marketing team would write. A perfect combination of incorrect and disingenuous.

Chrome needs to fix the Mac Keystone WindowServer lag issue:

Details here: Chromeisbad.com

Keystone globally slows down UI and drains battery life, especially notable on older machines. Completely uninstalling chrome felt like upgrading to a new CPU on my 2013 MacBook.

Does anyone else find that they can't ever tell a difference in browser speed in day to day use?

I switched to FireFox for my personal use a few years before the "Quanutm" update when it was theoretically much worse than Chrome and didn't notice a difference. For the last few years, I've been using Chrome and FireFox side by side with Chrome for work and FireFox for my own stuff and switching back and forth feels pretty seamless. (With the exception of Gmail which is abysmal on FireFox, but I somehow doubt that's Mozilla's fault)

I think the takeaway from this article is that LTO is very difficult to use, if a company with dozens of full-time language platform engineers was not able to use it until the project's 15th year.
Off Topic: Chrome is likely a very good benchmark for comparing between Intel x86 chip and Apple M1. Where Google spend enough time to optimise on both platform.

I wonder if they could work on Memory usage next.

Compared to Safari, getting jank from Address bar, bookmark, history, show all tabs, SafariBookMarkSyncAgent is leaking memory. It seems every release Safari added more features and bug fix for compatibility while performance has been in steady decline.

V8 is an absolute marvel of engineering. The performance gains are very impressive.

But Chrome still has some work to do on rendering performance. The switch to hardware acceleration was actually a deceleration for quite a few cases. For example rendering very large concave SVG paths is probably 10x faster on Firefox compared to Chrome. I hope to see some effort in future to improve this, too.

Why is it so difficut to find the average page load time for the most popular websites AKA wpt6 ?? Enough of those asbtract synthetic benchmarks..
Congrats to Chrome team, this is impressive.
Why is it chrome specifically on chromium blog ? Does this not mean chromium and chromium based browsers also ?
IMO Chrome desperately needs to minimize its memory usage.
> Nothing is more frustrating than having a slow experience while browsing the web.

This seems a bit tone deaf with a war going on?

Lighthouse now deducts best practices score if you don't show adds, truly a milestone.
Nice try, Chrome, but I'll stay on Firefox.
Oh goodie, more headroom for inducing advertiser demands.
Harvesting my data at unprecedented speeds.
The Chromium blog shouldn't refer to Chrome. There are many browsers based on Chromium and all would have the benefit from any changes to the core. If this is really just Chrome only then what is it doing on this blog in the first place?
Am I so wrong to stop reading after a grammatical error on the very first word in the article?

https://www.google.com/search?q=everyday+two+words+or+one