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

Big speedup on reverse dependency calculation #5005

Merged
merged 2 commits into from
Jan 25, 2022
Merged

Conversation

AltGr
Copy link
Member

@AltGr AltGr commented Jan 18, 2022

We need to revert a huge simply-linked structure; the big cost was allocating
the intermediate data, so instead of creating the graph or going through sets,
we use the integer identifiers already defined by Cudf and store that in a
simple table.

Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! I can confirm an almost 2x speedup on --depends-on + --recursive.
e.g. opam list --depends-on dune --recursive -s --all-versions take

  • 9.4s before this PR
  • 5.1s with this PR

And no difference in the result 🎉

No noticable difference could be obversed with non-recursive queries

@rjbou
Copy link
Collaborator

rjbou commented Jan 18, 2022

All these opam list PRs highlighted that there is no opam list test... Feel free to add one, or i can add it later

@kit-ty-kate
Copy link
Member

Done in #5006

@AltGr
Copy link
Member Author

AltGr commented Jan 19, 2022

Test failure doesn't seem related to the PR 😕

@rjbou rjbou added this to PR in progress in Opam 2.2.0 via automation Jan 19, 2022
@rjbou rjbou added this to the 2.2.0~alpha milestone Jan 19, 2022
@kit-ty-kate kit-ty-kate added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jan 20, 2022
We need to revert a huge simply-linked structure; the big cost was allocating
the intermediate data, so instead of creating the graph or going through sets,
we use the integer identifiers already defined by Cudf and store that in a
simple table.
@kit-ty-kate kit-ty-kate removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jan 22, 2022
@kit-ty-kate kit-ty-kate moved this from PR in progress to PR to review in Opam 2.2.0 Jan 22, 2022
@AltGr AltGr merged commit 8f7de0c into ocaml:master Jan 25, 2022
Opam 2.2.0 automation moved this from PR to review to Done Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.2.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants