Feeds

Google man open sources Chrome build system

'We call it Ninja. It strikes quickly'

New hybrid storage solutions

Google Chrome developer Evan Martin has open sourced the custom-designed build system he uses to build the browser's Linux port.

Martin calls the system Ninja because it "strikes quickly." According to Martin's Ninja manual, he previously used a customized system based on the old GNU Make build-automation system, and while this needed 10 seconds to start building the open source Chromium browser after a file change was made, Ninja takes under a second.

When Google first decided to port Chrome beyond Windows, Martin says on his blog, the company considered using the Scons software-construction tool, but it was soon deemed to be too slow. According to Martin, Scons needed about 40 seconds before it started building.

Chrome is a single executable with about 30,000 source files.

Dropping Scons, Google began using plain old Makefiles to port the browser. And Martin was soon haunted by build times. "I [became] more and more obsessed with build performance," he says. "I once clocked our Windows build taking eight minutes to finish linking after a one-file change and I found it devastating for both my productivity and my morale."

Martin tweaked the system until he had worked incremental builds down to between 10 and 20 seconds. But this wasn't enough. "I still wasn't happy about the ten seconds of waiting between running 'make' and the first compilation step starting. It seemed to me that with a warm disk cache, it shouldn't need to think that hard," Martin says.

Eventually, Martin designed his own build system from scratch, trying to make it as fast as possible. "I thought I'd try making a very simple build system; conceptually very similar to Make, but with hardly any features," he says. And once this was up and running, he added in several tools missing from Make. And this became Ninja.

Ninja is now available from github, and the Ninja manual is here. ®

Update: This story has been updated to show that Ninja is Martin's personal project and that it is only used for the Chrome Linux port.

Reducing the cost and complexity of web vulnerability management

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.