Severe regression in wine startup latencies

Alan W. Irwin irwin at
Sun Aug 28 11:37:41 CDT 2011

On 2011-08-27 18:11-0700 Daniel Verkamp wrote:

> On Sat, Aug 27, 2011 at 5:22 PM, Alan W. Irwin
> <irwin at> wrote:
> [...]
>> bash.exe-3.1$ which echo
>> /z/home/wine/newstart1/MinGW/msys/1.0/bin/echo.exe
>> bash.exe-3.1$ time echo "hello"
>> hello
>> real    0m0.000s
>> user    0m0.000s
>> sys     0m0.000s
>> This shows there is at least one command (echo) available under wine
>> that executes with essentially zero latency.  So the problem cannot be
>> the time wine takes to read the executable file
>> (/z/home/wine/newstart1/MinGW/msys/1.0/bin/echo.exe in this case). But
>> the rest of the commands I tried had latencies near 1 second.  (I only
>> report the second run in each case to make sure as much as possible is
>> cached in memory for maximum speed.)
> Aside from any actual slowdown, this test is not accurate - echo is a
> shell builtin.  Try timing running the actual echo executable (with
> full path) rather than just "echo" (which will run the builtin).

You are absolutely right.

bash.exe-3.1$ time /z/home/wine/newstart1/MinGW/msys/1.0/bin/echo.exe

real    0m0.503s
user    0m0.080s
sys     0m0.020s

Also, I tried
time (x; x; x; x; x; x; x; x; x; x), where "x" represents the complete
echo command above, and the result was

real    0m5.281s
user    0m0.800s
sys     0m0.200s

In other words, it is the executable echo command that has the latency, not the
built-in "time" command or built-in echo command.  I have done some
other time tests on MSYS bash built-ins such as test, and they were
essentially instantaneous as well while the executable versions were
slow (~0.5 seconds like above).

Does this difference between built-in and executable latency give a clue
about what the issue is?

To move to a slightly different topic, after reviewing my previous
notes about the 0.150 second latency of commands for 1.2-rc3 (the last
time I checked this), it appears that I tested latency a different
way, e.g.,

wine at raven> time wine MinGW/bin/mingw32-make.exe --version
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

real    0m0.405s
user    0m0.080s
sys     0m0.040s

A half second is a huge amount of computer time.  This time does not
appear to be due to wine setup since if you misspell the executable
name you get fast results:

wine at raven> time wine MinGW/bin/mingw32-make.exe1 --version
wine: cannot find 'MinGW/bin/mingw32-make.exe1'

real    0m0.006s
user    0m0.000s
sys     0m0.008s

This style of latency check corresponds to the cmake "MinGW Makefiles"
generator approach which builds with pure MinGW commands without using
MSYS at all so these sorts of latency checks are still relevant to the
fundamental question of reducing overall latency of CMake builds on
wine.  My notes imply the above correctly spelled command took only
0.150 seconds for 1.2-rc3 which implies a factor of 3 regression in
latency for wine 1.3.27.  However, for those old tests my MinGW/MSYS
software stack was different so I will attempt to replicate them again
(and also the bash timing versions above) with the only change being
wine-1.2 versus wine-1.3.27.  I will also, just for kicks, try
wine-bash (a much older bash version that started as a port of bash
to NT) timing tests as well for the two wine versions.

While I am doing those additional investigations, please consider the
question of why there is a huge difference between built-in and
executable latency for MSYS bash commands under wine.  To start that
investigation it would be good to compare the wine results for those
two cases with the Windows results for those two cases.  (I assume the
two time results for built-in versus executable will be fairly similar
in the Windows case, but that assumption needs to be checked.) I don't
have access to Windows myself. Anybody up for doing that simple test
and reporting the results back here?  The automatic MinGW/MSYS
installer at
MinGW Installer/mingw-get-inst/ makes it easy to install the relevant
MinGW/MSYS software on both wine and Windows.

Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (; the Time
Ephemerides project (; PLplot scientific plotting
software package (; the libLASi project
(; the Loads of Linux Links project (;
and the Linux Brochure Project (

Linux-powered Science

More information about the wine-devel mailing list