[Bug 17660] Starcraft slow down when select any building or units

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jul 11 17:53:56 CDT 2010


--- Comment #7 from Matteo <bugs.kendatsuba at gmail.com>  2010-07-11 17:53:55 ---
Created an attachment (id=29546)
 --> (http://bugs.winehq.org/attachment.cgi?id=29546)
cure for slowness

This bug is still present in wine-1.2rc6. Selecting buildings during upgrading,
overlords, evolving eggs and everything displaying a progress bar results in
100% CPU usage and slowness. The main cause is an increased number of
Locks/Unlocks needed to paint the scene.

As pointed out here:


frequent Locks/Unlocks can lead to performance losses. Unfortunately even by
setting DirectDrawRender to opengl one still gets extremely high CPU usage
under the above circumstances. 

The attached patch is a hack made specifically for starcraft that tries to
overcome the problem. Locks/Unlocks are redirected to a memory buffer and real
video memory Locks are allowed to occur roughly 50 times per second. This
successfully reduces the CPU overhead both in gdi and opengl mode. 

Example: DirectDrawRenderer = opengl with "CPU throttling" enabled in starcarft
results in 25-30% CPU usage on my Pentium(R) 4 CPU 2.66GHz even when selecting
overlords / buildings.

Note that this is not a fix of wine's directdraw implementation, it will only
work with starcraft, possibly breaking other apps. I've tested the patch on
wine 1.0.1 (debian testing) and wine 1.2rc6, is there anyone willing to test it

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list