I've noticed that for some reason invoking execx is slower than it needs be, so I checked if importing the zoxide init xonsh file was faster, and it was!
So I've cached it and if it exists and matches the zoxide init xonsh output, import the file instead of executing the output, and got a ~3 factor speedup, although not that huge in absolute
convert to Python and load from cache
cache zoxide init in a file to speed up startup (execx only if cache is missing)
Also converted to Python, but not sure how much that part saves
(and partially converted to the newer declarative template to avoid installation errors)
I've noticed that for some reason invoking
execx
is slower than it needs be, so I checked if importing thezoxide init xonsh
file was faster, and it was! So I've cached it and if it exists and matches thezoxide init xonsh
output, import the file instead of executing the output, and got a ~3 factor speedup, although not that huge in absoluteAlso converted to Python, but not sure how much that part saves (and partially converted to the newer declarative template to avoid installation errors)