Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I did a full install of Cygwin on my Windows 7 x64 machine. After each machine reboot, Curl can take around 6 seconds to start (even if no command line options were specified). On subsequent uses of Curl there is no delay. It looks like a DLL is being initialized or ? Has anyone else seen that and is this normal?

share|improve this question
    
Could be the Cygwin DLL initializing itself, if no Cygwin processes have been previously started. How are you invoking curl -- from the Windows shell, or from Cygwin bash? Do you have any Cygwin services enabled, or any Cygwin commands that run on startup or login? –  Aaron Miller Aug 12 '13 at 16:12
    
I am invoking it from the Windows cmd prompt (not from bash). I haven't configured any other services to start. I have reproduced the problem on other machines including 32 bit Windows XP so I am thinking it might be the normal time to startup but I want to confirm this. –  user265445 Aug 12 '13 at 17:38

1 Answer 1

up vote 2 down vote accepted

This is normal; the first time the Cygwin DLL runs, it performs several initialization steps, which can potentially be time-consuming, to set up the Cygwin environment. This initialization occurs the first time after system boot that a Cygwin process is created, and there is unfortunately no real way around it.

The best recommendation I can offer is to modify your system startup scheme, or your login scripts, to create a Cygwin process, so that the initialization time gets "rolled in" at a point when you're already expecting to be waiting on the system, rather than occurring later on when you're expecting a quick response. For example, you might add something like the following, as a batch file, to C:\Users\<your username>\AppData\Local\Microsoft\Windows\Start Menu\Programs\Startup:

c:\cygwin\bin\run.exe '/bin/bash -c "ls > /dev/null"'

This will launch a Cygwin bash process which fairly quickly does nothing and then exits, without displaying a window on your console -- thus forcing the Cygwin DLL to load and initialize itself, without producing any side effects, and so that when you finally open a command prompt and run curl, the initialization time will have already occurred, and you won't be annoyed by it while running interactive commands.

share|improve this answer
    
Thanks for the link, that explains the delay I was seeing. –  user265445 Aug 12 '13 at 19:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.