-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remote: re-implement merkle tree buildling
The TreeNodeRepository served us well, but has become a bit dated over time and it's increasingly hard to understand and to fix bugs. Additionally, it was written with the initial intend of incrementally updating the merkle tree between actions, however internal performance analysis has shown that doing so is 1) hard to implement reliably and 2) would increase memory consumption multifold. This is a rewrite of the code that also fixes bugs like #4663. MerkleTree implements a visitor pattern over an InputTree and is responsible for serializing the InputTree to the protobuf merkle tree that's used by remote caching / execution. Benchmarks on my local machine have shown this implementation to consumes between 2-10x less wall time than the current implementation. Tests by users have shown equally encouraging speedups [1]. [1] https://groups.google.com/d/msg/bazel-discuss/wPHrqm2z8lU/mzoRF236GQAJ Closes #7583. PiperOrigin-RevId: 237421145
- Loading branch information
1 parent
04f28cb
commit 7f72544
Showing
10 changed files
with
379 additions
and
866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.