commit | 01ee36eeeaf21fdb8517f63470de1e034dbecb66 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Tue May 17 13:57:12 2016 -0700 |
committer | Colin Cross <ccross@android.com> | Fri Aug 05 14:00:30 2016 -0700 |
tree | 9cc04b97015d8ab3051f359d39e02b5713914197 | |
parent | 9544a07d2f869e7f60e32f02d7d620a6aacc16d5 [diff] |
Optimize proptools proptools cloning and extending are a significant portion of the run time for Soong. Optimize out calls to reflect.Type.Field(), which must allocate a []int to store the index, by caching all the fields of each type as it is seen, and by iterating over a slice of cached fields instead of calling Field(i) for each one. Also avoid calling reflect.Value.Interface() twice on the same Value. Change-Id: I4e13fc85f30d8614a5586283e928c0a6d7f24809
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.