First execution of a `nimble build` after system startup incurs in ~1minute slowdowns
Whenever executing the very first nimble build after booting up my machine, it takes a really long while for nimble to finish, around one whole minute.
Subsequent calls to the command execute as normal. Attaching a screenshot with said executions:
This only happens on the very first execution after reboot, and it seems like it happens every single time, so I can reproduce it quite easily.
Tested on Linux Ubuntu 22.04 x64, nimble compiled ffrom sources as part of the nim 2.2.4 release.
Nimble version:
nimble v0.18.2 compiled at 2025-04-22 13:39:47
git hash: b1dc28450f028aead0b7cf5da8adf2267db65f89
Seeing similar issues. Nimble sometimes takes forever to complete. I think it might be building a cache of installed packages and that somehow takes forever. It probably stores this cache in /tmp which on many Linux distros is stored in memory and therefore wiped on reboot. If it was moved to getCacheDir instead it should at least only be slow once on the first run.
I don't know if there was any activity on this, but I can add that it seems like it is not happening on macos.
Observed on:
- MacOS 16.6 (Arm M4)
- Same nim/nimble version as above
Well does it still happen on Ubuntu?
Same thing with nimble v0.20.1, it is still happening on Ubuntu
I wasn't able to repro it. Mind to test it with the head version? (0.99.0)
I had this for about 1 month while working on my Nim computer graphics project on Linux. For me it took about 30 seconds on the first build after boot with Nimble 0.20.1. Somehow the delay is not there anymore after I completely removed my Nim install and redid it with Choosenim. I'm still using Nim devel version and Nimble 0.20.1.
Idk what is going on with this bug. I did a fresh Linux install (CachyOS) and it came back. I still have the same exact home directory and Nim install. Now it takes 30 seconds to 1 minute for nimble to even start building the program. I'm still on Nimble 0.20.1, because the last time I tried 0.99.0 it didn't allow me to use a Nim devel version as a requirement for my package. Nimble 0.99.0 fixes the delay.
last time I tried 0.99.0 it didn't allow me to use a Nim devel version as a requirement for my package
if this is still the case, please submit a small repo in a new issue and it will be fixed ASAP