Ticket #35090 (closed defect: fixed)
Running bash_completion script is slow, due to have() function
|Reported by:||justin.lebar@…||Owned by:||raimue@…|
$ time bash /opt/local/etc/bash_completion real 0m2.954s user 0m0.078s sys 0m0.037s
If I modify the have() function so it returns 0 (instead of running |type|) I get
$ time bash /opt/local/etc/bash_completion real 0m0.245s user 0m0.059s sys 0m0.010s
I'm totally in favor of not loading complex completion scripts for commands that aren't installed, but that doesn't appear to be what's happening here; have() guards only very basic completion for some commands, afaict.
Making opening a new terminal window 10x slower for the sake of avoiding some |complete| calls seems like a premature optimization and a bad trade-off.
- Status changed from assigned to closed
- Resolution set to fixed
- Port set to bash-completion