Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow performance on startup #50

Closed
GoogleCodeExporter opened this issue Apr 15, 2015 · 3 comments
Closed

Slow performance on startup #50

GoogleCodeExporter opened this issue Apr 15, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

I think this is related to defect #2. I also experience a delay of up to 12 
seconds from the moment when I start puttycyg, until I get the login prompt. 
Taking into accounts the comments by medgar123, I disabled the local FW prior 
to running the below tests:

A. Baseline, without using puttycyg (times reported are averages real time on 5 
consecutive runs)

1. C:\>bash -c "time bash -c 'echo hello world'"         ==> 0m0.108s
2. C:\>bash -c "time bash --login -c 'echo hello world'" ==> 0m3.662s

B. Puttycyg tests (times measured by hand)
I created a shortcut, and set "start in" equal to putty.exe folder. 

1. target "C:\Program Files\PuTTYcyg\putty.exe" -cygterm bash          ==> <1s 
(nearly immediate)
2. target "C:\Program Files\PuTTYcyg\putty.exe" -cygterm -             ==> ~4s
3. target "C:\Program Files\PuTTYcyg\putty.exe" -cygterm bash --login  ==> ~4s

So far, so good - times are consistent with Windows console and bad performance 
is probably caused by cygwin login process itself (btw, I have default profile 
and bashrc). 

Now the next step, using a saved session, shortcut on Destkop
4. target "C:\Program Files\PuTTY\PuTTYcyg\putty.exe" -load CygWin     ==> ~4s
5. same as 4, but shortcut is copied to quick start                    ==> ~4s

Here comes the weird part. When I modify shortcuts 4 & 5, to have the "start 
in" field empty (same target)
6. shortcut on destkop     ==> ~4s, still consistent
7. shortcut in quick start ==> 10-12s !!!!!

Obviously this is not critical as I have found a workaround, but still the 
behavior is quite strange, although I'm not sure it's really caused by puttycyg 
itself.

This behavior was consistently reproduced on 2 different XP machines.

As a side note, if you have any idea why the cygwin login process is taking so 
long, I would love to hear it.


PutTTYcyg version: 20101029
Cygwin version: 1.7.7-1
Windows version: XP SP3 (5.1.2600)

If you are experiencing performance issues, do you have a multi-core system
or multiple CPUs? Yes (Intel Core2 Duo)

Do you have any firewall software installed? Yes, McAfee HIPS (disabled for the 
tests above, but identical results when running)

Original issue reported on code.google.com by dre...@gmail.com on 11 Nov 2010 at 10:33

Attachments:

@GoogleCodeExporter
Copy link
Author

By the way, in case anyone is interested, the reason for the slow startup of 
bash at login, is due to the introduction of bash completion in Cygwin 1.7, the 
loading of which is taking a long time.

Reference: http://sourceware.org/ml/cygwin/2010-08/msg00651.html

Original comment by dre...@gmail.com on 11 Nov 2010 at 6:56

@GoogleCodeExporter
Copy link
Author

Thanks for the explanation!  I've updated the FAQ.

Original comment by medgar123 on 15 Nov 2010 at 9:28

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Check /etc/profile.d/bash_completion.sh. This by far was taking the most time 
in my situation and I solved it by adding an immediate "return" at the top of 
said script.

Original comment by cla...@anodized.com on 25 Jan 2011 at 10:14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant