-
Notifications
You must be signed in to change notification settings - Fork 348
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
opam is utterly slow on basic errors #5479
Comments
Looks like it's the 2.1.x depexts probing that's causing the slowdown.
and with depexts disabled
|
Indeed. Here:
Your machine looks faster. My soon to be replaced computer is old, a 2015 model – it's still the laptop paid for by ocamlabs seven years ago! |
My RISC-V board feels the pain a lot worse -- it takes 10s sometimes to pass the same startup time! |
Can you try with master? #5297 speeds up plugin lookup, cf #5296 (comment) |
Using
|
(Since it may have influenced the timing note that I did not upgrade the state in order to be able to go back to the previous version, I have too much switches I don't want to nuke right now and need a stable opam) |
I just tested locally and this has no influence (if anything, for me it was 0.005s faster 😅) To compare here is the timing information i got on a freshly upgrade opam on a fast machine (M1Pro):
Loading switch state still takes 0.2s even on a fairly fast machine. Testing on the second slowest machine i have (Late 2012 Mac Mini) the same thing gets me:
I have several RPi4 that might be a bit slower but they're not cooperating at the moment. To me, 2.5x slower on a 10 years old machine seems to be a reasonable expectation. That said, now we could try to explore further and try to improve the performance of the cache and switch loading code but this seems quite tricky. For example, from what I can see, the bulk of the time is spent here converting the entire map of opam packages to its definition to a set for ease of use and memory print reduction further down the line: opam/src/state/opamSwitchState.ml Line 348 in 334cf68
|
It's spring, you need to water them. |
A basic command line typo takes more than 3s to respond. Not very pleasant.
The text was updated successfully, but these errors were encountered: