-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
git-annex loads very slowly when dynamically linked #4239
Comments
I guess the severity of this issue depends on the speed of your machine / hard disk. On my laptop, git annex version responds within a second, which isn't super fast, but the delay is not very noticeable either. Anyway, it might be worthwhile to link this binary statically just to reduce the number of run-time dependencies. |
…to get rid of some run-time dependencies #4239
Fixed by 6476678. |
Switching git-annex over to haskell-ng lost this fix and reintroduced the problem. (I don't get haskell's arcane build setup, or else I'd've submitted a hopefully trivial patch.) |
git-annex has literally dozens of dependencies, and loading all of them at run-time can be slow (NixOS#4239).
peti@f145201 disables shared liking for git-annex again. |
git-annex has a lot of Haskell dependencies, which makes it really slow to load up when it's dynamically linked.
It takes over 3 seconds to start on my machine, even for just a simple "git-annex version". This constant delay makes git-annex very painful to use in the terminal. Both the official build and a simple static version of the Nix build load nearly instantly.
I put the following override in my config.nix:
That builds and runs correctly, so git-annex should probably be static by default. I assume this also affects all other Haskell tools, but git-annex is the only big one I use.
(I'm still completely new to Nix (and Haskell), so I have no idea how to further test or profile this. Is there a reason Haskell tools, in particular the ones with giant dependencies, are dynamically linked?)
The text was updated successfully, but these errors were encountered: