commit | 8c1c6c03f8ad3e1267c047b83d6e7262de989c73 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Tue Apr 14 16:28:51 2015 -0700 |
committer | Colin Cross <ccross@android.com> | Wed Apr 15 11:03:17 2015 -0700 |
tree | d6f4a8145741b70004667ee2d263060cac6c75de | |
parent | 7bf6f6213017775c4392119d3970ab719ba9074a [diff] |
Pre-allocate ninjaString slices Naively pre-allocate ninjaString slices by counting $ characters as an estimate of how many variables will be needed. Saves 5% cpu time on one workload. Change-Id: Ib3a41df559d728b2db047f6dbbf9eb06d7045303
Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a Ninja manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files.