delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/20/15:42:44

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-6.8 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: <4C6EDA60.7030600@redhat.com>
Date: Fri, 20 Aug 2010 13:41:20 -0600
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100805 Red Hat/3.1.2-2.el6 Mnenhy/0.8.3 Thunderbird/3.1.2
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Bash login slow after upgrade to cygwin 1.7
References: <AANLkTi=FJx=xaKMDSV_D7oDFVRPGaoSSs=CeL+rcReEY AT mail DOT gmail DOT com> <i4mdgd$fnc$1 AT dough DOT gmane DOT org> <AANLkTinN0vcPcDrCR0gzMuYffrFu31=M+aN_+wtzFfLP AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTinN0vcPcDrCR0gzMuYffrFu31=M+aN_+wtzFfLP@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------enig07F86E1A542D71C13E496EE2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 08/20/2010 12:24 PM, Andy Koppe wrote:
> On 20 August 2010 18:20, Nahor wrote:
>>  On 2010-08-20 7:50, Jeremy Ramer wrote:
>>>
>>> After upgrading from cygwin 1.5 to cygwin 1.7 starting a bash shell is
>>> much slower.  It usually takes around 4 seconds before I get a prompt.
>>>  On cygwin 1.5 it was only around 1 second.  I captured some logs from
>>> the startup using this process:
>>> - Open cmd shell
>>> cd C:\cygwin\bin
>>> bash --login -i -x 1>  C:\startlog.txt 2>&1
>>>
>>> The log is attached. I don't see anything strange except that it seems
>>> pretty long. The same process on cygwin 1.5 gives much less output. I
>>> can provide that log if needed.
>>> Any ideas?
>>
>> It's the loading of all the bashcompletion scripts. Move the directory
>> /etc/bash_completion.d away and you'll see it's a lot faster.
>=20
> Perhaps bash completion shouldn't be enabled just by installing it,
> because lots of people seem to install everything "just in case".

On Fedora, bash-completion is not installed by default.  The mere act of
installing enables it (although admittedly, since forks are so much
faster on Linux, you don't notice the speed penalties of loading all the
completion stuff).  I see no reason why cygwin has to be any different -
if you installed it, you must want it.  Then again, not as many people
try to install _everything_ on Fedora, as what seems to be the case with
people using setup.exe to install _everything_ whether it is needed or not.

Also, I know that the upstream bash-completion developers are working on
loadable modules.  Right now, everything is loaded up front (and the
bulk of the loading time is spent on PATH searches: if app A exists,
install completion function _A, and so on for loads of apps).  But in
the future, the startup will be (for all registered apps, install a
dummy loader completion without any forking or PATH searches; then on
first invocation of command A, the dummy will take care of loading the
real completion function _A).  If anyone wants to help that process move
along, please join the upstream bash-completion development team.

--=20
Eric Blake   eblake AT redhat DOT com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org
volunteer cygwin bash-completion maintainer


--------------enig07F86E1A542D71C13E496EE2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJMbtpkAAoJEKeha0olJ0NqyH8H/2fm/+1wKnTDg9cNIYELBJH3
DXVGHwvzIRta2ZGB6FyMu0AQQqqfv7JBVebw6ZxNAh65KK88kNJUUxm3lA24AnMm
+c5q5D4IsAtB/3FXKfV5uvzceMFNzJ8qNyJe5t0LPZcQ6hniPwCnxt3p9dWYrmAb
Mkg9v6aJoH8Rw1qKKOFMDozYEu2f+FUj4qesAwN5zf16ctOC85zDNu5Qfse85+hn
pwM6ejhSdIUFmLFg0GoXZRcX7XVAQBgpEBl/rIhoNdjQLA78jnBWnP+sgCUcmOpN
dYGbnnx9o8uT6MJtIfKRRC6VDGmDx/Iec3RzJsafSQYDywsIdCE+whH9zMJZE34=
=KY+C
-----END PGP SIGNATURE-----

--------------enig07F86E1A542D71C13E496EE2--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019