[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Measuring Enigma's performance: A paradox?

From: Daniel Heck
Subject: Re: Measuring Enigma's performance: A paradox?
Date: Wed, 14 Apr 2021 10:51:39 +0200

   Now that I think of it, have your experimented with the way screen
   updates are handled in ecl::Screen:flush_updates()? When there are
   more than 200 updated regions on the screen, the function simply
   updates its entire contents, which might be related to your
   observation that drawing more is faster.

Good idea ... I did four more experiments, in otherwise the same setup as yesterday, and reproduced yesterday's results to be sure. Summary:

WITH statusbar, SOMETIMES update_all: 13.0 s (<- default)
WITH statusbar, ALWAYS update_all: 15.4 s
WITH statusbar, NEVER update_all: 13.3 s
NO statusbar, SOMETIMES update_all: 13.9 s
NO statusbar, ALWAYS update_all: 21.0 s (no typo!)
NO statusbar, NEVER update_all: 14.5 s

So ... first of all, it seems like your choice of 200 updated regions hits a sweet spot. Also: If Enigma just always flushes everything every time, the difference between having the statusbar and not having it gets even more pronounced. What this means ... I have no idea.

Interesting... and weird. Could this have something to do with alpha blending? What happens if you add

    SDL_SetSurfaceBlendMode(m_sdlsurface, SDL_BLENDMODE_NONE);

to the constructor of ecl::Screen?

- Daniel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]