Post-Quantum Firefox 58 Packs Additional Multi-Threading

Post-Quantum Firefox 58 Packs Additional Multi-Threading

Firefox Quantum’s launch late last year gave the world an impressive look at what a major rewrite could do for the browser, and it remains an excellent piece of software several months later. The new Firefox 58, which dropped yesterday, introduces new features and capabilities of its own, setting the stage for additional enhancements later this year.

One major feature? The use of Off-Main-Thread Painting, or OMTP. Here’s how Mozilla explains the new capability:

Post-Quantum Firefox 58 Packs Additional Multi-Threading

In Firefox 58, the painting process (the act of actually drawing all the pixels of a web page) has been moved to its own thread.

The main thread of a browser is always a scarce commodity. It runs the page’s scripts, responds to user input, and maintains the current state of the page. Prior to OMTP (Off-Main-Thread Painting), the current state of the page was converted to drawing commands, and the pixel data of the whole page was generated (or rasterized) on the main thread. This meant the performance-critical tasks of scrolling or animation or script could be interrupted, or that a script could cause dropped frames or “jank”.

With OMTP on the other hand, the visual state of the page is still computed on the main thread, but the potentially costly task of rasterization is passed off to a designated “rasterization thread”, and the main thread can carry on and stay responsive.

To keep CPU usage lower overall, Firefox 58 also begins throttling background tab timers. They’ll still fire, but at a reduced rate. This won’t apply to tabs playing media in the background, or those that require active CPU time to function.

This joke has nothing to do with this story. Life is just too short not to mock Internet Explorer.
This joke has nothing to do with this story. Life is just too short not to mock Internet Explorer.

There are also new improvements to Firefox’s screenshot capability — you can access it through the three dots next to the address bar, and seriously, I’m using it all the time these days — some JavaScript handling changes to improve page loads, and some font handling changes.

On a personal note, if you couldn’t tell already, I’m still quite impressed with Firefox Quantum. Yes, Mozilla got some egg on its face over its Mr. Robot promotion last month, but the browser as a whole is a remarkable improvement over previous versions. Your mileage may, as always, vary but I’ve been quite happy with it. Certainly happier than I was with any previous iteration of the browser in recent memory. So far, there’s no indication that Quantum has helped stem Firefox’s downward slide — Statcounter and Netmarketshare both suggest it continues to decline, but since those stats are global, they might not pick up country-specific shifts.

Not long after Quantum debuted, Mozilla noted it had seen a 44 percent jump in downloads from Chrome users, a 24 percent uplift on mobile, and that the new version was snapped up more quickly than previous products. Hopefully we see signs of that reflected in user share in coming months.

Note: Firefox is talking up its Tracking Protection and other features around user privacy with Firefox 58, but as far as I can tell, these features all actually went in with Firefox 57. It’s still a good idea to read up on the tracking stuff if you weren’t previously aware of it, but I haven’t called it out as a new feature the way the Firefox blog implies because, as far as can tell, it isn’t.