garnix-io/garn

The first command takes a long time without feedback

Opened this issue · 3 comments

I tried garn enter --help, and it hung for a while before continuing, without any feedback. And I've seen something similar in user tests.

After the first time it's much faster.

On a bad network connection, this has already taken 5 minutes!

It now finished. Part of the problem seems to be gomod2nix:

nix path-info -Sh 'github:nix-community/gomod2nix?rev=f95720e89af6165c8c0aa77f180461fe786f3c21'
/nix/store/yvzwmzwdkbign8h0433m0hvzy01hpzxf-gomod2nix-dev	557.5M

But additionally, I think we should have a helper function that, every time we run a command, logs what the command being run is, if it takes longer than, say, 3 seconds.

Maybe for all these commands that fetch things, we should first check whether they're installed already. If not, log that we're installing them, that we're done installing them, and then run them.