Opened 4 years ago

Last modified 21 months ago

#6941 new defect

GUI: Performance issues in higher resolutions

Reported by: SF/rootfather Owned by:
Priority: normal Component: GUI
Keywords: Cc: raziel_nosgoth@…
Game:

Description

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 (11)

comment:1 by Kirben, 4 years ago

Try switching SDL to the DirectX video driver: Add the environment variable SDL_VIDEODRIVER, with a value of "directx".

comment:2 by SF/rootfather, 4 years ago

Hi kirben, unfortunately, setting the environment variable had no effect on the performance issues within the GUI.

comment:3 by SF/rootfather, 4 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 Kirben, 4 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 raziel-, 4 years ago

Same performance problems on AmigaOS4. It doesn't matter if i choose normal or OpenGL.

comment:6 by lordhoto, 4 years ago

Summary: GUI: Performance issues in higher resolutions [Win32]GUI: Performance issues in higher resolutions

comment:7 by lordhoto, 4 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 SF/rootfather, 4 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 raziel-, 4 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 sev-, 3 years ago

Component: GUI

comment:11 by raziel-, 21 months ago

Cc: raziel_nosgoth@… added
Note: See TracTickets for help on using tickets.