nimble icon indicating copy to clipboard operation
nimble copied to clipboard

First execution of a `nimble build` after system startup incurs in ~1minute slowdowns

Open Abathargh opened this issue 6 months ago • 8 comments

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:

Image

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

Abathargh avatar Jun 02 '25 12:06 Abathargh

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.

PMunch avatar Jul 17 '25 11:07 PMunch

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

Abathargh avatar Sep 16 '25 19:09 Abathargh

Well does it still happen on Ubuntu?

Araq avatar Sep 17 '25 12:09 Araq

Image

Same thing with nimble v0.20.1, it is still happening on Ubuntu

Abathargh avatar Sep 17 '25 17:09 Abathargh

I wasn't able to repro it. Mind to test it with the head version? (0.99.0)

jmgomez avatar Sep 17 '25 17:09 jmgomez

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.

Cloudperry avatar Oct 06 '25 13:10 Cloudperry

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.

Cloudperry avatar Oct 29 '25 13:10 Cloudperry

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

jmgomez avatar Oct 29 '25 17:10 jmgomez