commit | 8ac0a812f120fd7f2a1da07f6228352dee4b84d0 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Tue Apr 14 15:38:36 2015 -0700 |
committer | Colin Cross <ccross@android.com> | Wed Apr 15 11:03:06 2015 -0700 |
tree | 119820aaf61f574eff473433801e6c847ae7ee69 | |
parent | 75de3e8e1d4a939ef7d12875036df7360158aaaa [diff] |
Optimize ninja_writer Prebuild a string of all spaces to avoid calling strings.Repeat for every indented line. Replace appendWithWrap function with a class that handles counting bytes on a line as they are written instead of buffering lines, and avoids extra string concatenations by providing a function that implicitly adds a space. Saves 10% wall time on one workload. Change-Id: I571d70366ee5db21c40c1c98d0fe92d640efefab
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.