Opened 7 years ago
Closed 3 years ago
#6941 closed defect (outdated)
GUI: Performance issues in higher resolutions
|Reported by:||SF/rootfather||Owned by:||sev-|
I noticed some performance issues within the GUI when running ScummVM in higher resolution fullscreen mode (e.g. 1680x1050).
When running ScummVM in this high resolution and in fullscreen mode, the GUI stops responding for a few seconds each time I click on a button in the GUI. The mouse cursor is also quite laggy in all resolutions and even in windowed mode. The problem only occurs using the modern theme, not when using the classic built-in theme.
The problem occurs on my (weak) laptop running Windows 7, 8(.1) and Windows 10 as well as on my quite powerful Intel Quad-Core with nVidia 9600GT graphics card. Performance in the games itself is great, so no general performance issue. Affected versions are at least 1.6.0, 1.7.0 and current git versions.
For me as a non-developer, it seems that there's some optimization potential for the GUI renderer? There's also no difference whether I select the anti-aliased gui renderer or the standard one.
Best regards rootfather
Ticket imported from: bugs/6941.
Change History (13)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Hi kirben, unfortunately, setting the environment variable had no effect on the performance issues within the GUI.
comment:3 by , 7 years ago
Hi kirben, just for clarification: Do you mean setting the environment variable in Windows or somewhere in the code? Setting the environment variable in Windows has no positive effect to the issue.
I also wonder why performance in the old, built-in GUI and within games is perfectly fine, even on my weak AMD E450 powered laptop. The modern GUI has quite a lot of lag when running in OpenGL mode and on the screen's native resolution.
comment:4 by , 7 years ago
That change will effect all SDL 1.x based programs, if you set the enviromental variable via the Enviromnetal Variables section on the Advanced tab of the System control panel in Windows. SDL 1.x defaults to windib by default, which can be slower, since Windows Vista onwards lacks GDI hardware acceleration.
If you are using OpenGL, then performance depends completely on your display drivers.
comment:5 by , 7 years ago
Same performance problems on AmigaOS4. It doesn't matter if i choose normal or OpenGL.
comment:6 by , 7 years ago
|Summary:||GUI: Performance issues in higher resolutions [Win32] → GUI: Performance issues in higher resolutions|
comment:7 by , 7 years ago
Yes, this should be a performance issue in our GUI (renderer). It's not the fastest. I have a Core 2 Q9550, but the GUI was never really unresponsive for more than a second or so.
comment:8 by , 7 years ago
I'm currently kind of tracking down the issue, but it's not that easy with my limited knowledge of how the GUI renderer exactly works.
Because in-game performance is just great on both of my machines, I focused my search on gui-manager.cpp.
I tracked down the rather laggy mouse cursor to 2 commented lines in gui-manager.cpp: Have a look at lines 301 and 302:
~~~~ ~~~~ // _theme->updateScreen(); // _system->updateScreen();
When I remove the comment marks and recompile, the mouse cursor is perfectly smooth. But I don't think thats really a fix, because someone must have commented out those lines on purpose, right? The GUI becomes as unresposive as before as soon as I click a button or a tab in a dialog.
The problem does not occur when using the old built in theme, so maybe something in the theme engine is the culprit?
Best regards rootfather
comment:9 by , 7 years ago
Maybe it's because of the images? Maybe the loading isn't optimized/buffered/whatever?
The classic theme doesn't use any images, not even for the logo and it's lightning fast.
comment:10 by , 6 years ago
comment:11 by , 5 years ago
comment:12 by , 3 years ago
Is this still a problem?
The quoted source lines have been commented-in again since then, as far as I can tell.
Also, I don't have the lagging mouse cursor any more.
Can this be closed?
comment:13 by , 3 years ago
|Status:||new → closed|
Closing. Also, scummmodern theme should perform better because it does not use extensive alpha shadowing.
Try switching SDL to the DirectX video driver: Add the environment variable SDL_VIDEODRIVER, with a value of "directx".