-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(maven): improve PreFetch for Maven (#1485)
We disabled `PreFetch` in #1466 and this caused the resolution performance worse for deps.dev client. To enable `PreFetch`, we need to avoid unnecessary requests of `maven-metadata.xml` files which is a result of calling `MatchingVersions` and `Versions`. This PR improves the logic in `PreFetch` so that `MatchingVersions` is only called for non-soft Maven requirements and `Versions` is called for ecosystems other than Maven. It used to take about 1m to resove [pom.xml](https://github.com/google/osv-scanner/blob/main/internal/remediation/fixtures/zeppelin-server/pom.xml) without `PreFetch` enabled and now it takes less than 20 seconds.
- Loading branch information
Showing
2 changed files
with
29 additions
and
17 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