Skip to content
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

feat: use new asynchronous resolvo code #200

Merged
merged 14 commits into from
Feb 9, 2024
Merged

Conversation

tdejager
Copy link
Contributor

@tdejager tdejager commented Feb 6, 2024

get_dependencies and get_candidates now spawn tasks to process asynchronously.

@aochagavia
Copy link
Contributor

Happy to see it worked out in the end!

@tdejager
Copy link
Contributor Author

tdejager commented Feb 6, 2024

Quick benchmark:

There are two versions:

  • rip without async resolvo code.
  • rip-async with async resolvo code.

Both were compiled with --release and copied over. Don't know about the statistical interference, I had no discord or IDE running. Nonetheless, relative numbers stayed equal so don't think it matters much for comparison.

Benchmark 1 without a cache

Command: hyperfine "./rip quetz-server" "./rip-async quetz-server" --prepare "rm -rf /Users/tdejager/Library/Caches/rattler/"

Benchmark 1: ./rip quetz-server
  Time (mean ± σ):      2.952 s ±  0.129 s    [User: 0.578 s, System: 0.363 s]
  Range (min … max):    2.802 s …  3.129 s    10 runs

Benchmark 2: ./rip-async quetz-server
  Time (mean ± σ):      1.975 s ±  1.242 s    [User: 0.481 s, System: 0.395 s]
  Range (min … max):    1.343 s …  5.483 s    10 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Summary
  ./rip-async quetz-server ran
    1.49 ± 0.94 times faster than ./rip quetz-server

Benchmark 2 with a cache

Command: hyperfine "./rip quetz-server" "./rip-async quetz-server" -w 2

Benchmark 1: ./rip quetz-server
  Time (mean ± σ):      1.567 s ±  0.074 s    [User: 0.339 s, System: 0.457 s]
  Range (min … max):    1.469 s …  1.707 s    10 runs

Benchmark 2: ./rip-async quetz-server
  Time (mean ± σ):      1.094 s ±  0.428 s    [User: 0.371 s, System: 2.439 s]
  Range (min … max):    0.803 s …  2.021 s    10 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Summary
  ./rip-async quetz-server ran
    1.43 ± 0.56 times faster than ./rip quetz-server

Seems like a nice improvement!

@tdejager
Copy link
Contributor Author

tdejager commented Feb 6, 2024

Before merge

  • Get rid of the tracing statements.

@baszalmstra
Copy link
Contributor

This is ready for a final review! @tdejager @nichmor @wolfv

@baszalmstra baszalmstra merged commit 5097e72 into prefix-dev:main Feb 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants