http://bugs.winehq.org/show_bug.cgi?id=29582
--- Comment #2 from Daniel Santos daniel.santos@pobox.com 2012-01-11 00:49:17 CST --- Created attachment 38323 --> http://bugs.winehq.org/attachment.cgi?id=38323 sad little hack for swbf2 loading performance probs
fuck! (sorry for the language) These programmers are fucking idiots!
I injected a hack and decreased loading times to about 30% of what it was taking before (still not as fast as on windows). Basically, all it does is when PeekMessageX is called and no messages are returned, it sets a timer to prevent it from making the wineserver call again for 1 millisecond. Also, calls to GetForgroundWindow return a cached value (this part has a minor bug in it, but works enough for the test). The synopsis? It makes unneeded calls to PeekMessageA and GetForgroundWindow 24k per second each!
So I guess we're dealing with a special ed case here.