The cross-platform browser fallacy
As I watch my browser sluggishly scroll a page, I can’t help but think: with all this hardware, why can’t we have decent performance in our browsers?
I have 320 processors1 on my graphics card, together with half a gigabyte of memory. Four cores crunch instructions at over 3GHz, storing data in four gigabytes of main memory. Surely that is enough for smooth page scrolling? I mean, seriously — my 1MHz Commodore 64 could scroll things smoothly!2
The problem with todays browsers is that everyone assumes that a browser has to be cross-platform. A new browser obviously has to rule the world, so it has to run on all the major platforms. And since those have wildly different APIs, a compatibility layer is needed on top of them. Performance, you ask? Oh, it got lost along the way.
Let’s list the benefits that multi-platform browsers bring to users:
- slow rendering and scrolling
- code bloat resulting in low performance
- large memory consumption
- bugs resulting from overly complicated code
For all the unified experience talk, not a single browser can even sync bookmarks across platforms!3 Don’t believe the hype; there is exactly zero benefit from the multi-platformness of our browsers.
It used to be that for economic and political reasons it was necessary to have a unified multi-platform solution. Mozilla/Firefox had to do it to fight the IE monopoly and the misconception that Internet==IE (also to get money from Google for directing searches to them). Safari and Chrome had to be multi-platform because of Apple’s and Google’s world domination goals. IE didn’t have to be multi-platform, but curiously enough was designed as such anyway, so even though it only runs on Windows now, it carries a load of platform abstraction cruft.
Today, we live in a world where it is generally accepted that there can be many browsers and one has to stick to standards when designing web pages. World domination goals can safely be dropped: you don’t have to rule the world anymore.
Every major platform out there exposes the GPU to applications. There are also platform-specific approaches to threading, networking and disk I/O, providing great performance.
I would like to see a Mac-specific browser4, a Linux-specific browser and a Windows-specific one. Each one should be light and trimmed, make the best possible use of platform-specific features, use the native GUI and integrate with the OS.
Stop building multi-platform monsters, users don’t need them.
1 Give or take a hundred.
2 …and do it in the overscan area where supposedly it was impossible to display anything!
3 Foxmarks/Xmarks finally came along and did the job right.
4 Safari 4 is close, but it could do better.