Skip to content

Optimize BOM handling #3193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 26, 2024
Merged

Conversation

alexarchambault
Copy link
Member

@alexarchambault alexarchambault commented Dec 19, 2024

Fixes #3190

@alexarchambault
Copy link
Member Author

Currently still not as fast as before 2.1.17 (but we should be doing more useful calculations too 🤷‍♂️). Here are timed runs before BOM support / after (no optimizations) / with optimizations. The optimizations bring a lot (~8 to ~1 second on my machine), while we are around 0.5s without BOM support.

$ cs launch io.get-coursier:coursier-cli_2.13:2.1.16 -- resolve io.trino:trino-hive:467 -B 10
Warm-up 1 / 10
1561 ms
Warm-up 2 / 10
1070 ms
Warm-up 3 / 10
768 ms
Warm-up 4 / 10
652 ms
Warm-up 5 / 10
578 ms
Warm-up 6 / 10
530 ms
Warm-up 7 / 10
490 ms
Warm-up 8 / 10
486 ms
Warm-up 9 / 10
485 ms
Warm-up 10 / 10
482 ms
Benchmark resolution
476 ms
Resolution error: Conflicting dependencies:
io.grpc:grpc-core:1.54.1 or 1.68.1 or [1.54.1] wanted by

  com.google.cloud:google-cloud-storage:2.45.0 wants 1.68.1
  └─ io.trino:trino-filesystem-gcs:467
     └─ io.trino:trino-filesystem-manager:467
        └─ io.trino:trino-hive:467

…

$ cs launch io.get-coursier:coursier-cli_2.13:2.1.22 -- resolve io.trino:trino-hive:467 -B 4
Warm-up 1 / 4
9267 ms
Warm-up 2 / 4
8298 ms
Warm-up 3 / 4
8201 ms
Warm-up 4 / 4
7846 ms
Benchmark resolution
7903 ms
aopalliance:aopalliance:1.0:default
ch.qos.logback:logback-core:1.5.12:default
com.amazonaws:aws-java-sdk-core:1.12.779:default
…

$ cs launch io.get-coursier:coursier-cli_2.13:2.1.22-5-3050eb074-SNAPSHOT -- resolve io.trino:trino-hive:467 -B 10
Warm-up 1 / 10
2256 ms
Warm-up 2 / 10
1225 ms
Warm-up 3 / 10
1234 ms
Warm-up 4 / 10
941 ms
Warm-up 5 / 10
878 ms
Warm-up 6 / 10
852 ms
Warm-up 7 / 10
908 ms
Warm-up 8 / 10
820 ms
Warm-up 9 / 10
934 ms
Warm-up 10 / 10
1043 ms
Benchmark resolution
849 ms
aopalliance:aopalliance:1.0:default
ch.qos.logback:logback-core:1.5.12:default
com.amazonaws:aws-java-sdk-core:1.12.779:default
…

@alexarchambault
Copy link
Member Author

The code here needs to be cleaned up (contains unnecessary stuff - failed optimization attempts)

@alexarchambault alexarchambault merged commit 495075a into coursier:main Dec 26, 2024
23 checks passed
@alexarchambault alexarchambault deleted the dep-mgmt-optim branch December 26, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance regression since coursier 2.1.17
1 participant