X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4BE41E73.3010007@redhat.com> Date: Fri, 07 May 2010 08:06:43 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: bash -i with installed and enabled bash_completion starting too slow References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBBE8245EC49A0A9E4CA86BE5" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigBBE8245EC49A0A9E4CA86BE5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/07/2010 02:08 AM, Oleksandr Gavenko wrote: > from sh I run: >=20 > sh-3.2$ time bash -i -c echo >=20 > real 0m0.218s > user 0m0.062s > sys 0m0.016s >=20 > sh-3.2$ echo ". /etc/bash_completion" >~/.bashrc # enable completion >=20 > sh-3.2$ time bash -i -c echo >=20 > 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. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org volunteer cygwin bash-completion maintainer --------------enigBBE8245EC49A0A9E4CA86BE5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL5B53AAoJEKeha0olJ0NqpgkH/0+GpFlhpldNdWDSflYpXP40 a+oy/Q9Ac3xuVsqs33UqXnzBI1v4vjZreeX9/BarZVbw+EEmR/jk7vkjpqKxPBPS VXa+PCS/9A0u0x2ojnXirHicKYbwAL3QKvclvE/ujZR7NKXh9hHRy0f501SXW/ld 6OqPxYw+1cV/vR6/CPdBzdCv/SRnPcNKJ3TtZt0H++WikVLb1ZzUjVhmLhmXCdzr kCiLxKqJDMN5VbdVz355bbkcNhnyYLV9f3Ckdqr3qiVsWYEBDvP50ef1Mlgo1Sty YOLOMCPdDfMCZ72I9p/8X3H3w/mh7G5z/3/3P4nOZqfua9CmaXCHNtx486XHOLo= =gqpI -----END PGP SIGNATURE----- --------------enigBBE8245EC49A0A9E4CA86BE5--