On 05/07/2010 02:08 AM, Oleksandr Gavenko wrote:
> from sh I run:
> 
> sh-3.2$ time bash -i -c echo
> 
> real    0m0.218s
> user    0m0.062s
> sys     0m0.016s
> 
> sh-3.2$ echo ". /etc/bash_completion" >~/.bashrc   # enable completion
> 
> sh-3.2$ time bash -i -c echo
> 
> real    0m2.657s

Yes, this is a known issue with the current bash-completion - it sources
a HUGE file, which conditionally defines lots of shell functions after
probing which commands are present, and if your $PATH includes anything
with high-latency probing (like a networked drive), it adds up fast.
Upstream bash-completion is working on a plugin-style completion, where
the initial framework loads quickly without any program probing, and
then hitting TAB per program loads just that program's completion
routines, but it is still a work in progress.  So it will get better
over time, and get there faster if you help contribute upstream.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org
volunteer cygwin bash-completion maintainer

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to