http://bugs.winehq.org/show_bug.cgi?id=21423
--- Comment #8 from Dan Kegel dank@kegel.com 2010-01-31 18:35:04 --- Yes. There is one directory with 1900 files in it. Using http://www.winehq.org/pipermail/wine-patches/2008-June/056508.html and then doing WINEDEBUG=+timestamps,+file, I could see that searching that directory for any particular file takes as long as 3ms, as measured by the time it took between
trace:file:wine_nt_to_unix_file_name L"\Program Files\Microsoft SDKs\Windows\v7.0\Include\typeinfo" not found in /home/dank/.wine-chromium-tests/dosdevices/c:/Program Files/Microsoft SDKs/Windows/v7.0/Include
and the trace message immediately before it.
Furthermore, adding a kludgy bloom filter cache to GetFileAttributesW halved the time to compile base (from 43 seconds to 24 seconds), so that's definitely the sore spot. I'll attach the bloom filter patch, but it's a total kludge, so it's only good for demonstrating the bottleneck.