commit | c22c43da2a7fe0a0e62090d2c1d6a67b9a715a8c | [log] [tgz] |
---|---|---|
author | Michael Bolin <mbolin@fb.com> | Wed Oct 30 12:23:08 2013 -0700 |
committer | Michael Bolin <mbolin@fb.com> | Wed Oct 30 13:52:47 2013 -0700 |
tree | 0b014ba9f98992d9579aabdb490963e57efb1ba5 | |
parent | a43cecc1e205555938ba82c64d30c9bb13ef747d [diff] |
Replace InputRule with Path. Summary: Updated `ConcurrentMapFileHashCache` to use a `LoadingCache` to maintain the mapping from `Path` to `HashCode`. Previously, `InputRule` contained four fields (`File`, `BuildTarget`, `ListenableFuture`, `RuleKey`). We had one of these for potentially every file in a project. That is a large potential for wasted memory. The existence of `InputRule` also required us to persist some kludginess in `BuildTarget`. This diff removes the hacks from `BuildTarget` and reclaims potentially a ton of memory. By using a `LoadingCache`, we do not have to worry about the same input file being sha1'd multiple times. We can also stop passing around references to a pathResolver in many places and rely on `Path` being a path relative to the project root. Test Plan: Sandcastle builds.
Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.
To build Buck, run the following:
git clone git@github.com:facebook/buck.git cd buck ant ./bin/buck --help
Apache License 2.0