PATCH: PeekMessage - reducing load

Ove Kaaven ovehk at ping.uio.no
Fri May 18 17:47:11 CDT 2001


On Fri, 18 May 2001, Marcus Meissner wrote:

> winword.exe apparently uses a while (PeekMessage()) loop. 
> 
> Both wineserver and 1 wine thread take up 90% CPU even if idle.
> 
> This adds a timeout of 10 milliseconds so we are still interactive, 
> but do not take up as much CPU. (We basically wait 1 timeslice if 100HZ
> scheduling).

I question this... an app could be doing something important in such a
loop, i.e. while (!PeekMessage()) do_a_piece_of_important_stuff(), and
this would severely slow down things like that. In particular, I expect a
lot of games to use such loops. If you need CPU time reduction, at least
make it configurable.





More information about the wine-patches mailing list