Tiny patch cuts Firefox 4's startup time in half

A 20-line coding fix boosts the Web browser’s speed on Windows, particularly for slower systems.

While all the world scrutinized the proposed "Do Not Track" feature for Mozilla's Firefox 4 on Monday, a tiny patch quietly emerged that promises to cut the open source browser's startup time in half on Windows.

The 20-line patch works by preloading Firefox's XML Markup Language (XUL) library. Whereas previously that library was loaded in chunks of 32KB or less, the patch works by "tricking" Windows into preloading the library in 2MB increments instead, Mozilla developer Taras Glek explained recently on Mozilla's Bugzilla forum.

The patch shaved two seconds off of the browser's startup time in Glek's initial trial -- representing a performance improvement of 40 per cent -- but the results were even better on a machine with a slow hard drive.

"Shaved around 50 per cent off cold startup on my reference slow system," he wrote. "This patch works better than I expected. Not only does it trade random xul.dll io for faster sequential io. It also reduces the amount of seeks later on (ie no need to seek for xul bits), which significantly speeds up io on other files."

The Need for Speed

In Firefox's competition with Google's Chrome and Microsoft's Internet Explorer browsers, speed has become a pivotal factor.

Chrome is often viewed as the leader in that respect, but Firefox 4 promises significant improvements, not just through this latest patch but also via the inclusion of the new JägerMonkey JavaScript engine.

With 23 per cent of the browser market in December, Firefox holds the No. 2 position in that arena, following only Internet Explorer, which accounts for 57 per cent, according to the latest data from researcher Net Applications.

While Microsoft's share last month represented a decline from the 58 per cent it held in November, Firefox enjoyed a small increase over the 23 per cent it held in November, Net Applications reported. Firefox was also recently named the No. 1 browser in Europe by research firm StatCounter.

Coming Soon?

Slated to appear soon in a Firefox 4 nightly build, the feature could ultimately make its way into the browser's next official version, which is due next month. If that happens, it could give Firefox another boost ahead of the competition.

Follow Katherine Noyes on Twitter: @Noyesk.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags open sourceInternet-based applications and servicesFirefoxWeb-based Applicationsapplicationsbrowserssoftwareinternetmozilla

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Katherine Noyes

PC World (US online)
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Kurt Hegetschweiler

Brother PocketJet PJ-773 A4 Portable Thermal Printer

It’s perfect for mobile workers. Just take it out — it’s small enough to sit anywhere — turn it on, load a sheet of paper, and start printing.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?