This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bash login slow after upgrade to cygwin 1.7


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.
> 
> 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.

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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]