commit | 7ff2e8d2a42d77cd23e1a9af17662345e914e7ee | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Thu Jan 21 22:39:28 2021 -0800 |
committer | Colin Cross <ccross@android.com> | Fri Jan 22 10:22:21 2021 -0800 |
tree | a5d601ab44b8facfe75e4febdd818ccbbb9ceeb1 | |
parent | bcd5686660315df6ee5540a2d8647ddf6123545a [diff] |
Optimize updateDependencies Avoid reallocating module.forwardDeps and module.reverseDeps every time through updateDependencies by resetting the slices without reducing their capacity. Accumulate dependencies to visit directly into module.forwardDeps. Use a loop instead of a map to check for duplicates, average number of dependencies is measured to be 9.5, although there are a few outliers with up to 2108. Reduces mean soong_build execution time on internal master from 87s to 82.7s (5%). Test: context_test.go Change-Id: I58fcd5514e494bafa965443461851b21b7bce382
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.