-
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.
BEP events retain ActionInputMap holding only important artifacts.
To support IDE use-cases, 06c9566 changed target completion events to keep a reference to the ActionInputMap in order to keep around metadata specifying if an output file is a directory or not. This worked but caused an unexpected increase in heap high-watermark, causing OOMs. The unexpected heap usage was traced to large _validation output groups holding tens of thousands of artifacts per target. This output group is not included in BEP so the original change was in fact retaining far more memory than necessary to implement the intended optimization. With this change, a second ActionInputMap is prepared which includes only the "important" artifacts and is sized appropriately. Important artifacts are those which are not produced by internal output groups and are exactly the artifacts whose URIs are written to BEP. Maintaining this second ActionInputMap costs additional latency in CompletionFunction proportional to the number of important artifacts, though care is taken to avoid doubling the runtime of CompletionFunction in the case where all artifacts are important. PiperOrigin-RevId: 378793974
- Loading branch information
1 parent
44461eb
commit f1b1cc5
Showing
6 changed files
with
231 additions
and
15 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
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.