Opened 4 days ago
Last modified 4 days ago
#15530 new defect
BAGEL: Excessive CPU usage
Reported by: | eriktorbjorn | Owned by: | dreammaster |
---|---|---|---|
Priority: | normal | Component: | Engine: BAGEL |
Version: | Keywords: | ||
Cc: | Game: | The Space Bar |
Description (last modified by )
ScummVM 2.9 pre-release, running in Linux.
According to the "top" command, outside of the movie cutscenes the game is constantly using 95% or more of the CPU. Even in debug mode, that seems excessive.
From what I understand, CBofApp::runApp() uses Graphics::FrameLimiter to maintain 60 fps, and it also appears to be making constant full-screen updates. Which seems excessive. (I'm running without V-Sync. With V-Sync, I don't think frame limiter actually does anything?)
As an experiment, I turned down the fps to 20. Now "top" to reports about 50% CPU used. Though when bringing up a menu (Examine, Attack, Pull leg off, etc.) it goes back to 100% again so I guess that's in another event loop? In the scenes where you can turn around freely, I can see that it's now less smooth. In the conversation close-ups, I can't really tell the difference.
But I'm guessing the frame rate isn't the actual problem, it's that it's actually doing screen updates on each frame, whether it's needed or not?