Direnv performance improvement on shell startup time #57
Replies: 5 comments 2 replies
-
A hybrid solution like you describe is a reasonable suggestion indeed if you need zippy startup times for the terminal. This may deserve an honorable mention in the readme. |
Beta Was this translation helpful? Give feedback.
-
Yes, please consider improving our documentation. |
Beta Was this translation helpful? Give feedback.
-
I have just updated your plugin and this following setup works fine for me:
on the direnvrc i only have this
|
Beta Was this translation helpful? Give feedback.
-
but i also am using powerlevel10k prompt shell which might have probably fixed the start up time i had with the shell... |
Beta Was this translation helpful? Give feedback.
-
What would perhaps be neat is if the asdf direnv plugin actually generated your And then with vanilla PATH_rm '$ASDF_INSTALLS_DIR/nodejs/*'
PATH_add "$ASDF_INSTALLS_DIR/nodejs/18.13.0/bin"
So yeah instead of |
Beta Was this translation helpful? Give feedback.
-
Currently, using asdf-direnv and setting up a gloval .envrc file makes the shell unusably slow.
To combat this I did the following on my setup:
on my zshrc i just setup asdf regularly, and include the direnv hook which looks like this:
afterwards i do create a global direnv file with the following contents, which are basically copy pasted from .asdf/asdf.sh
What does this give me?
Basically I get all the benefits of using asdf globally with no cons regarding shell startup time by using asdf-direnv.
If for some reason I do indeed need some custom direnv solution which doesnt use my global asdf settings then ofc we go into direnv land.
This makes the shell startup time a little bit more bearable if you have a lot of asdf plugins installed.
If someone ends up on the same situation as me, this is how i solved it.
Aso, I do know you can use some direnv caching using nix, but I had never heard of nix before and I do not want to learn yet another new thing to do this so voila.
Beta Was this translation helpful? Give feedback.
All reactions