Feeds

Google man open sources Chrome build system

'We call it Ninja. It strikes quickly'

The Power of One Brief: Top reasons to choose HP BladeSystem

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.

Securing Web Applications Made Simple and Scalable

More from The Register

next story
Apple fanbois SCREAM as update BRICKS their Macbook Airs
Ragegasm spills over as firmware upgrade kills machines
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Captain Kirk sets phaser to SLAUGHTER after trying new Facebook app
William Shatner less-than-impressed by Zuck's celebrity-only app
Do YOU work at Microsoft? Um. Are you SURE about that?
Nokia and marketing types first to get the bullet, says report
Microsoft takes on Chromebook with low-cost Windows laptops
Redmond's chief salesman: We're taking 'hard' decisions
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Reducing security risks from open source software
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.