-
Notifications
You must be signed in to change notification settings - Fork 373
Closed
Labels
Description
Opam 2.1.2 and 2.2 appear to have pretty different speed on the lock and install commands.
$ opam --version
2.1.2
$ time opam lock ahrefs-all-deps
Generated lock files for:
- ahrefs-all-deps.git: /home/me/.../ahrefs-all-deps.opam.locked
real 0m2.482s
user 0m2.354s
sys 0m0.128s
$ time opam install --deps-only ./ahrefs-all-deps.opam.locked
real 0m1.060s
user 0m0.917s
sys 0m0.143s
vs
$ opam --version
2.2.0~alpha3
$ time opam lock ahrefs-all-deps
Generated lock files for:
- ahrefs-all-deps.git: /home/me/.../ahrefs-all-deps.opam.locked
real 0m0.587s
user 0m0.462s
sys 0m0.125s
$ time opam install --deps-only ./ahrefs-all-deps.opam.locked
Nothing to do.
real 0m10.967s
user 0m10.390s
sys 0m0.576s
In 2.2 lock
is much faster but install
is much slower.
From the debug output my understanding is that the solver is used in install
with 2.2 but not with 2.1. Note that this is only the case with lock files, install
with 2.1 on the raw ahrefs-all-deps
takes ~10s and triggers the solver.
For lock
the difference also seems to be calling the solver or not. But here the solver is not called in 2.2, so things got faster.