Make independent owners requests per file to improve memoization #10491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
#10441 caused a performance regression from about 10s to run
./pants dependencies --transitive ::
with inference enabled, to about 22s.Solution
Make independent owners requests per file we'd like to find owners, which allows the lookups for each file to be memoized independently.
Result
./pants dependencies --transitive ::
takes 15s. Although we are doing more work than before (before #10441, conftest discovery would only happen attest
time), this is not ideal, and we should do further optimization before launch. But there are a few variables that will impact this soon that make it not the best time to optimize: 1) an intrinisicPathGlobs->Paths
operation, 2) possibly enabling inference by default, allowing all of the strategies to use the module_mapper.[ci skip-rust-tests]