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

Improve performance of opam show by 300% when the package to show is given explicitly or unique #4998

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

kit-ty-kate
Copy link
Member

@kit-ty-kate kit-ty-kate commented Jan 14, 2022

Fixes #4997 and partially #4172

Before:

opam show --raw dune.2.9.0  0.94s user 0.32s system 97% cpu 1.286 total

After:

./opam show --raw dune.2.9.0  0.37s user 0.05s system 97% cpu 0.433 total

@kit-ty-kate kit-ty-kate added this to the 2.2.0~alpha milestone Jan 14, 2022
@kit-ty-kate
Copy link
Member Author

Some timings for opam show --raw dune.2.9.0:

  • opam 2.0.10: 0.7s
  • opam 2.1.2: 3.0s
  • this PR: 0.6s 🎉

(timings taken via an archlinux docker image)

@AltGr
Copy link
Member

AltGr commented Jan 17, 2022

Haha, nice one! I guess the costly part was the Lazy.force st.available_packages ?

@AltGr AltGr merged commit 193f30f into ocaml:master Jan 17, 2022
rjbou pushed a commit to rjbou/opam that referenced this pull request Apr 22, 2022
…am-show

Improve performance of opam show by 300% when the package to show is given explicitly or unique
@rjbou rjbou mentioned this pull request Apr 22, 2022
4 tasks
rjbou pushed a commit to rjbou/opam that referenced this pull request Apr 22, 2022
…am-show

Improve performance of opam show by 300% when the package to show is given explicitly or unique
rjbou pushed a commit to rjbou/opam that referenced this pull request Apr 27, 2022
…am-show

Improve performance of opam show by 300% when the package to show is given explicitly or unique
rjbou pushed a commit to rjbou/opam that referenced this pull request Jul 12, 2022
…am-show

Improve performance of opam show by 300% when the package to show is given explicitly or unique
@rjbou rjbou modified the milestones: 2.2.0~alpha, 2.1.3 Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opam show --raw <pkg> should not perform installability checks
3 participants