mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
ad9b4290e5
Whenever completing any git commandline, we invoke __fish_git_using_command 173 times*. Every invocation calls "commandline" and "argparse" to the same effect. Let's parse the command line once, and reuse the results later. I'm observing a speed-up from 200ms to 120ms with perf stat -r 10 buildrel/fish -c 'complete -C "git checkout ">/dev/null' Alternative solutions: 1. teach fish to cache such things automatically. 2. rewrite git completions to compute most completions in a single function, which will naturally avoid redundant work. This sounds viable but it's a lot of work. * we have a thousand uses of __fish_git_using_command, so I'm not sure why it's only 173. See the discussion in #8266 |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish | ||
lynx.lss |