Why does `flox develop` retriggers some download/evaluation

I have the impression that flox develop retriggers some download/evaluation of packages, possibly to get the latest ones. Is there a way to avoid that in order to get a faster startup?

There are a few causes for slowdown. We’re working to incorporate a workflow to make these “JustWork” with a flox activate call without you having to manually manage it.

Evaluation cache:

flox nix develop if that works (project-based environments will fail with an error), then the evaluation cache will work and give you speedup on subsequent invocations

garbage collection of previous invocations

flox develop --profile ./some-path this saves a rendered object to disk that can then be invoked by flox develop ./some-path which should be nearly instant. The produced symlink also prevents garbage collection of your build environment. You would then need to clean up or manage the generations of those symlinks yourself. This is roughly what some other similar tools do behind the scenes (direnv, lorri).

Edit: note, these are workarounds and might have drawbacks… the proper solution is being worked on

1 Like

That’s good to know, thanks I’ll try these out.