New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With several plugins, it's quite slow to start up #38
Comments
I know fisherman is fast because it uses a flat directory structure, avoiding the need to add things to the path at each shell startup. For omf, I am not sure. |
It takes like 2-3seconds to reload (a bit annoying when doing tests)
And I will probably add like 5 more plugins lol |
So, I've looked into this a bit, and there are a bunch of easy fixes to add, especially if you're okay with depending on fish 2.3.0 (which was released in 2016). Mainly, as always in shell scripts, these involve replacing external commands with builtins. E.g:
if not which git > /dev/null 2>&1 should be if not command -s git >/dev/null 2>&1 (or Most E.g. set -l plugin_dir (echo "$fundle_dir/$plugin/$path" | sed -e 's|/.$||') should be replaced with set -l plugin_dir (string replace -r '/.$' '' -- "$fundle_dir/$plugin/$path") I've gotten the time to load 16 random plugins down from 300ms to 75ms (of which at least 25ms is spent in the plugins themselves). |
@faho Thank you very much! Is there any chance you could send a PR with your improvements please? It's ok to drop 2.2, people using an old version of fish will just have a slower startup, that's not a big deal. I'll maybe add a check in the |
I think with fisherman and omf it is not as slow as fundle. However I really like fundle atm, simpler, easier to install and one nice plugin (fastdir).
Any idea how to make it quicker?
The text was updated successfully, but these errors were encountered: