A Quantum Leap for Firefox

Robert W. Oliver II
Sourcerer Blog
Published in
6 min readNov 22, 2017

--

There is no convincing reason for Google’s hegemony.

Sure, they have some fantastic online services. But putting all your technological eggs in a particular vendor’s basket is risky. Not only are you limiting yourself from exploring other ecosystems, but by relying on a homogenous environment for cloud services makes you vulnerable. Those who depended on Google Reader will understand this pain all too well.

Google Chrome is a fantastic browser. It pioneered fast JavaScript and browser sandboxing. It focused on performance-first browser design, and offered a clean, appealing cross-platform design. Because of its superior technology and Google’s dominant advertising position, it slowly became the browser of choice for nearly all segments of users.

But it wasn’t the first browser to upset the proprietary apple cart. Firefox rose from the ashes of the Mozilla browser and quickly shoved aside Safari and significantly dented Internet Explorer’s lead by offering a fast, secure, and open alternative.

But around 2011, even the shiny new Firefox couldn’t keep up with the times. Multi-core CPU and fast GPUs became commonplace on even the most inexpensive computers. Firefox was originally designed in a single-CPU era where beating Internet Explorer’s performance was a simple task. Google engineered their browser from the ground up to take advantage of multiple processes running on separate cores, enhancing users’ browsing experience considerably.

While Chrome was faster in many ways, there were often situations where user browser experiences were slowed down by excessive addons. Regardless of the actual cause, Firefox earned the reputation of many as being slow, and with Google’s performance and syncing capabilities users quickly bolted. Firefox went from a high of 33% market share in the summer of 2010 to a low of 7% in the spring of this year.

For those who like competition in browsers, things were looking bleak.

Quantum Theorizing

In 2013, Mozilla started the Servo project to replace the aging, yet mature Gecko rendering engine, with the primary aim of increasing performance through parallelism. By breaking rendering tasks up into tiny bits, multiple CPU and GPU threads can concurrently process these segments. Just as downloading a torrent with ample peers is faster than downloading via a single source, breaking larger tasks into smaller parts and processing them simultaneously yields faster results.

The Server project isn’t quite ready for prime time as of this writing. However, enough revamped code was available to introduce a new CSS engine named Quantum, and that, paired with an overhauled UI named Photon and the squashing of 369 performance-related bugs, yielded a browser that purports to be at least twice as fast as previous Firefox builds.

First Hand Experience

If you’re like me, claims like “twice as fast”, “new and improved”, and “but wait, there’s more” bring out the skeptical side. Eager to hedge my Google-dominated online experience, I downloaded the new Firefox Quantum and put its claims to the test.

At first, I didn’t do any kind of scientific experimentation. I just went by my assessment of apparent performance. In that regard, I was impressed. The performance seemed to be roughly on par with Google Chrome. This is still a considerable improvement, because previous builds of Firefox were substantially slower than Chrome.

The performance improvement is not universal, though. When starting a new tab, there seems to be a slightly longer delay than Chrome. There is a very slight, but perceptible delay between hitting enter to navigate to a site and the actual start of accessing the page. Once rendering begins, the speed increase makes up for the delay.

The perceptible performance increases were enough to make Firefox Quantum my daily driver. But I wanted to dig deeper. Is Quantum actually faster than Chrome?

Bench Testing

To put Quantum to the test, I installed it alongside Chrome on a Windows 10 64-bit install. The machine has 16 GB of RAM and an Intel i7–7700HQ processor.

Before we dig into actual benchmarks, let’s look at memory usage. With both browsers loading CNN, Facebook, Reddit, and Weather Underground, Firefox used 921 MB of RAM while Chrome clocked in at 892 MB. After leaving the tabs open for 5 minutes and then scrolling Facebook for 1 minute, Chrome increased to 994 MB while Firefox shot up to 1,276 MB. After loading an additional tab with an identical YouTube video and allowing it to fully play, Chrome increased to 1,310 MB, while Firefox decreased to 1,142 MB.

After continued testing like this, I discovered that while Firefox initially uses more RAM, it’s memory usage grows at a much slower rate than Chrome. Processes are reused, and garbage collection seems to be tighter, helping to curb excessive memory use. After continued, casual usage of both browsers, Chrome skyrocketed to nearly 3 GB of RAM used while Firefox stayed below 1.5 GB.

Memory usage is an interesting and useful metric, especially on machines with less than 8 GB of RAM. But in most cases, actual performance is better measured by benchmarking. Since modern browsers and internet connections are too fast to use stopwatches, we need to use actual benchmarking tools for the job.

I put both browsers through the following benchmarks and recorded the results:

· ARES-6 (lower is better) — Chrome: 28.12, Firefox Quantum: 65.48
· MotionMark (higher is better) — Chrome: 226.40, Firefox Quantum: 199.38
· speedometer (higher is better) — Chrome: 126.3, Firefox Quantum: 92.7
· Peacekeeper by Futuremark (higher is better) — Chrome: 4958, Firefox: 6729

In all but the Peacekeeper test, Chrome did better than Firefox, sometimes significantly so. Chrome certainly benefits from its powerful V8 JavaScript engine. Quantum’s scores should improve when more of Servo is integrated into the primary Quantum codebase.

Even though Firefox didn’t perform as well as Chrome, it is interesting to note that in daily browsing use, there isn’t a perceptible overall difference, at least to me, in the overall performance between the two. While Firefox is faster at some things, and Chrome faster at others, the two largely equal each other out in this admittedly purely subjective testing.

Developer Tools

Chrome has long excelled and providing powerful yet easy-to-use developer tools via the F12 key. Firefox offered this as well via Firebug, but the bulk of this functionality has been moved to Firefox Developer Edition. Having a separate edition for developers to debug web applications is an excellent move, but Chrome still manages to pack in quite a powerful array of utilities in its developer console. It had been a while since I had used the Firefox developer tools, so instead of downloading the developer edition, I opted to review the tools found in the main browser.

I loaded up a sufficiently complex web application (Google Maps in this case) and hit F12. I was surprised to see how familiar the interface was compared to Chrome. The inspector appears and functions nearly identically — offering the ability for me to tweak HTML and CSS inline. I often use this to play “what if” in the browser to help with CSS troubleshooting.

The console is straightforward — it’s simply a JavaScript console. The up arrow works as expected (recalling the last command). The debugger is very similar in function to the Sources tab in Chrome, the Style Editor duplicates much of the functionality of the Network tab in Chrome (without the waterfall display), Performance and Memory tabs allow for digging deep into metrics for intensive debugging, and the Storage tab largely covers the items available in the Application tab in Chrome, allowing you to view HTML5 storage, cookies, and related items.

The debugging tools in Firefox are essentially now on par with Chrome, which makes it an excellent browser for both every day and web developer usage.

Conclusion

I’m very impressed with Firefox Quantum. Even though I embrace and proselytize for open source, I often am forced to use closed source or mixed license programs like Chrome to do my daily work. While it’s true that no one has mandated I use Google Chrome, I, like many others, have enjoyed its speed and security since 2010 while wishing for a more open solution.

Firefox Quantum is the first release from Mozilla that has given me pause to critically examine Google’s monopoly in the browser market. I now have a viable alternative that performs nearly as well in everyday usage tests. I expect to see even better things from Quantum as more Servo code is included. Quantum is indeed the spark that is sure to rekindle the smoldering ashes of the browser wars.

--

--

Technical writer, fiction author, system administrator, web and embedded developer, and philosopher. https://sourcerer.io/rwoliver2