Why is there a very long 6 second delay in start of Curl
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?
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.