Feeds

Google man open sources Chrome build system

'We call it Ninja. It strikes quickly'

Combat fraud and increase customer satisfaction

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.

High performance access to file storage

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Ditch the sync, paddle in the Streem: Upstart offers syncless sharing
Upload, delete and carry on sharing afterwards?
prev story

Whitepapers

Designing a defence for mobile apps
In this whitepaper learn the various considerations for defending mobile applications; from the mobile application architecture itself to the myriad testing technologies needed to properly assess mobile applications risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.