The Quantum of Firefox: Why is this one unlike any other Firefox?
57: Mozilla's big bid for relevance
Interview The Mozilla Foundation has officially launched a radical rewrite of its browser, a major cross-platform effort to regain relevance in a world that seems to have forgotten Firefox. The much-rewritten browser claims to be twice as fast and uses 30 per cent less memory than Chrome, although this comes at the cost of compatibility, as Scott Gilbertson found here.
The proof’s in the pudding, and this pudding doesn’t feel like the old Firefox behemoth at all. It’s long overdue.
"Firefox is 13 years old – and very few applications have been around for 13 years without accruing technical debt,” Nick Nguyen, Mozilla’s VP of technology told us.
In fact, one could claim FireFox is even older, and relies on the Gecko code added after Netscape made the browser open source in March 1998. (FireFox was a branch of the Mozilla Suite … without the Suite.)
The Quantum project was a radical rewrite of Gecko for the modern era, where multicore processors are the norm.
"We’ve been rolling out multicore for the last year. It’s like cribbing from the game engine book: prioritising loads that people care about. So this means things like prioritising tabs that are in the foreground. Making sure the Facebook timeline scrolls really well. With ESPN we were spending time rendering the navigation bar when what people wanted was the content," Nguyen told us.
After a year, Quantum is finally here
“With Stylo – which is our first large scale Rust deployment – we’re dividing the work much better. Stylo scales perfectly with the number of cores. If you have four cores it’s four times as fast as one core.”
The Moz devs can keep track of actual usage with these figures.
"We do scale on the number of threads based on the user’s hardware profile. We can do more with two to four threads, rather than one thread per tab. We’re optimising per thread. One tread can share multiple tabs but we have a separate processes for the UI and addons so an addon can’t bring down the browser."
More gains can be expected once FireFox taps into the GPU. This is in the code available today, but disabled by default.
"You can turn it on, but it's pretty buggy. We’re aiming for 2018," says Nguyen.
On all fronts Firefox has been in retreat. Ignominiously, it has fallen behind Microsoft’s legacy browser Internet Explorer on the desktop by some counts, while it has less than 1 per cent share on mobile and tablet.
The gains from Quantum on mobile won't be as dramatic. Nguyen reminded us that Apple forbids third-party rendering engines, so on iOS, Mozilla is a wrapper around WebKit. But you do get privacy advantages, he says. While Android has inherited some gains too.
"Android gets some Quantum enhancements – it gets the new version of the renderer. It has real add-ons. You can have tracking protection turned on. But the deck is stacked against nondefault browsers. You can’t distribute a phone without Chrome, unless you give up Gmail," he points out.
The Mozilla Foundation ended its relationship with Google in 2014.