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
$ time nix-shell -A shells.ghcjs --run ""
trace: WARNING: ignoring dependency on doctest
real 0m9.771s
user 0m5.621s
sys 0m3.507s
$ time nix-shell -A shells.ghc --run ""
real 0m39.980s
user 0m19.607s
sys 0m19.092s
Note that this is with everything cached and seemingly ready to go. Is this normal? Is there any way to speed this up, specifically the GHC one? Or is this just some inherit limit of Nix? If it helps, I could also attach the verbose logs, though nothing seemed out of the ordinary (to me) there.
The text was updated successfully, but these errors were encountered:
You can improve startup time a little bit by setting:
withHoogle = false;
in your default.nix. There is definitely more improvements available to us, and I think we'll get better at this as time goes on. Right now, I think most people keep nix-shell's open for a long time to avoid the cost.
There are two phases that happen when you open the shell:
evaluation (time nix-instantiate -A shells.ghc)
setup (drv=$(nix-instantiate -A shells.ghc); time nix-shell $drv)
each takes about 5 seconds for me. I would be interested in seeing which of those take more time for you. The setup time is something I think we have lots of room for improvement, but unfortunately means digging into the Nixpkgs setup.sh script.
Ah yes, this was with Hoogle disabled. But boy...I just ran this on the same repository (no changes, but I had been messing with another repository that was pointing to the same reflex-platform), and now the GHC shell is only taking 10s. For what it's worth, evaluation is taking 0m2.442s and setup is taking 0m7.047s.
Anecdotally, when I had previously ran it on verbose there was no output for most of the time at the end, which looks to be the setup phase. I suppose if that's a part of nixpkgs, then that's just how it is for now!
Hopefully this improves on the Nixpkgs side with NixOS/nixpkgs#69131! I hope to eventually cherry pick this to 19.09 and 19.03 (which reflex-platform currently uses) .
I was playing around with https://github.com/ElvishJerricco/reflex-project-skeleton and found that even without adding any more packages, the time to enter a GHC shell is pretty slow. Interestingly, the ghcjs shell is a lot faster. My numbers:
Note that this is with everything cached and seemingly ready to go. Is this normal? Is there any way to speed this up, specifically the GHC one? Or is this just some inherit limit of Nix? If it helps, I could also attach the verbose logs, though nothing seemed out of the ordinary (to me) there.
The text was updated successfully, but these errors were encountered: