On 5/20/2013 3:32 PM, Alan W. Irwin wrote:
On 2013-05-20 11:52-0500 Kenneth Boyd wrote:

Can somebody with access to MSYS bash.exe on Microsoft Windows verify
that startup latency by timing "--version" options for standard
commands such as cmake?  If such times on a normal PC are hundreds of
milliseconds than you have confirmed the issue, but if they are only a
few milliseconds (8 on Linux, for example, for my entry level PC
hardware), then you have shown the issue doesn't exist for Microsoft
Windows which would contradict the above inefficient fork explanation.

sh-3.1$ time gcc --version
gcc.exe (4.3.3-tdm-1-dw2 mingw32) 4.3.3-dw2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


real    0m0.028s
user    0m0.000s
sys     0m0.015s

Kenneth

Here are the corresponding (second-time) numbers here for Linux
and Wine.

software@raven> time gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
[...]

real    0m0.002s
user    0m0.000s
sys     0m0.000s

That 0.002 seconds is so small that is probably only reliable
within a factor of two or so but indicates gcc --version
has hardly any overhead at all on Linux.

bash.exe-3.1$ time gcc --version
gcc.exe (GCC) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
[...]

real    0m0.176s
user    0m0.000s
sys     0m0.040s

That is an ugly factor of 90 or so compared to the Linux result. Your
own value is 14 times my Linux value but 1 sixth my MSYS/Wine value so
it is hard to interpret it.  Do you have an equivalent result on your
hardware for Linux?
No, I do not have a dual-boot Windows/Linux system on hand. I suspect that a Fedora LiveCD boot for testing would not be comparable to a proper install (my experience has been that Fedora LiveCD Linux is visibly slower than a native Windows install, across multiple versions.)

The actual procedure I used was:
* launch bash from cmd.exe in Win7 on the primary machine.
* Verify command line: bash.exe-3.1$ gcc --version
* time it: bash.exe-3.1$ time gcc --version

So while not quite a second-time number, it does work around filesystem caching.

6x slower is not at all surprising to me, for a speed hit for emulating Windows.

Kenneth
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to