Describe the bug
Very high evaluation times for output of lorri direnv with a large number of environment variables. In this example repo, I generate 2000 env vars and the eval takes 10-15s. I.e., every time you enter the repo directory, the shell is nonfunctional for 10-15s. There is a similar amount of overhead every time a change happens -> a nix build occurs.
This overhead is somehow linked to lorri — direnv using eval $(nix print-dev-env) instead of eval $(lorri direnv) takes on the order of a second to complete.
Describe the bug Very high evaluation times for output of
lorri direnv
with a large number of environment variables. In this example repo, I generate 2000 env vars and the eval takes 10-15s. I.e., every time you enter the repo directory, the shell is nonfunctional for 10-15s. There is a similar amount of overhead every time a change happens -> a nix build occurs.This overhead is somehow linked to lorri —
direnv
usingeval $(nix print-dev-env)
instead ofeval $(lorri direnv)
takes on the order of a second to complete.To Reproduce
direnv allow
, let lorri buildjournalctl --user -eu lorri
confirms that this slowness isn't because any nix builds have taken place.For more quantitative results, from the parent directory of
lorri-slow
:time direnv exec lorri-slow true
14.92s user 0.17s system 99% cpu 15.127 total
time nix-shell lorri-slow/shell.nix --run true
0.49s user 0.10s system 95% cpu 0.622 total
Expected behavior
lorri direnv
to finish evaluating in well under a second if not waiting on nix to build.Metadata