You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing certain number of packages from opam-repository, the size of the $OPAMROOT/<switch>/.opam-switch/build/ directory can become very large by the end of the command as each package's tarballs get extracted before they are built.
For example, when building async.v0.16.0, the directory reaches 2.8GB.
This is an issue for tools such as opam-health-check-ng, for which a common technique to improve its performance is to mount /var/lib/docker/ into tmpfs, which moves $OPAMROOT into RAM. RAM can be limited on some system and keeping all the build directories until the end makes the RAM usage much bigger than it should.
Code-wise, I believe that this code should be moved further up:
As a side-note, on Windows removing all the directories all at once at the end can take some time. If the removal were to be parallelized while other packages are being installed, it would be a good boost to performance.
The text was updated successfully, but these errors were encountered:
It looks like the implementation of this feature request would be impeded by the <pkg>:build variable (see https://opam.ocaml.org/doc/Manual.html#pkgvar-build). Is this used anywhere? If not I feel like there is very little use for it apart from _:build and we might want to remove it (at least the cross-packages version of it). Furthermore I believe this variable is currently broken when the dependency hasn't been installed at the same time as the package using the variable.
When installing certain number of packages from opam-repository, the size of the
$OPAMROOT/<switch>/.opam-switch/build/
directory can become very large by the end of the command as each package's tarballs get extracted before they are built.For example, when building
async.v0.16.0
, the directory reaches 2.8GB.This is an issue for tools such as opam-health-check-ng, for which a common technique to improve its performance is to mount
/var/lib/docker/
intotmpfs
, which moves$OPAMROOT
into RAM. RAM can be limited on some system and keeping all the build directories until the end makes the RAM usage much bigger than it should.Code-wise, I believe that this code should be moved further up:
opam/src/client/opamSolution.ml
Line 849 in eafdc81
As a side-note, on Windows removing all the directories all at once at the end can take some time. If the removal were to be parallelized while other packages are being installed, it would be a good boost to performance.
The text was updated successfully, but these errors were encountered: