conda-lock icon indicating copy to clipboard operation
conda-lock copied to clipboard

Performance using conda-lock in subsequent runs

Open nicoddemus opened this issue 6 months ago • 2 comments

Hi everyone,

First of all thanks for the excellent tool!

We've observed a curious performance characteristic when using conda-lock install, specifically regarding its execution time when no environment or filesystem changes have occurred.

For example, on my machine, a consecutive execution of conda lock install --name env-py310 .py310.win-64.conda-lock.yml (immediately after a successful initial run, with no modifications to the environment or lock file) consistently takes approximately 2 minutes and 10 seconds. This behavior is not isolated to a specific lock file.

For context, I tried the same workflow using pixi. While the first execution is comparable (around one minute or two), subsequent runs with no changes complete in less than a second (around 600ms). This comparison is not meant to disparage conda-lock, but rather to highlight that a faster "do nothing" execution is possible in theory.

We're interested in understanding if this is expected, or if there are other strategies or configurations that we might be overlooking?

nicoddemus avatar Jun 11 '25 11:06 nicoddemus

Thanks a lot @nicoddemus for the suggestion. This behavior is indeed expected with the current suboptimal implementation.

Does the proposal in https://github.com/conda/conda-lock/issues/751 cover what you're suggesting? I'm planning to look into this after resolving https://github.com/conda/conda-lock/issues/639.

maresb avatar Jun 14 '25 16:06 maresb

Thanks @maresb for the reply!

Left a comment in #751.

nicoddemus avatar Jun 16 '25 12:06 nicoddemus