-
-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Memoize graph walks on Context (#7758)
### Problem In profiling of noop runs, `Context.targets(predicate=..)` was taking up a surprising amount of time due to not being memoized. While investigating, I also noticed that `MutableBuildGraph` was made unnecessary via #7243 and others. ### Solution Remove `MutableBuildGraph`, inline one method that was unnecessarily abstract into `BuildGraph`, and then add support for a callback that can be used to invalidate caches of graph consumption. As the comments point out, we hope to eliminate mutability entirely for this usecase in the future. ### Result A 17% speedup for noop runs of larger targets.
- Loading branch information
Showing
6 changed files
with
64 additions
and
169 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 was deleted.
Oops, something went wrong.
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