Fullscreen vs Windowed CPU usage

I’m not noticing any frame drops, the scrolling is smooth also, but I noticed the CPU usage in windowed mode is basically the same as my idled PC and when in full screen it goes as high as 30%, surely it differs from core to core, the only ones I tested were FBA NEO and GenesisPlus GX with the same results in both GlCore and GL. Since I couldn’t figure out how to capture the CPU stats overlay in full screen, I took it as fast as I could as soon as I exited full screen, the second capture shows how much CPU it uses in windowed mode. I’m sure it affects heavier cores, so I’d like to know what is causing these peaks. Interesting when I activate fast forward in full screen the CPU usage drops below 10% and I see the GPU around 3 to 4%. Note that in this case I capped the fast forward to 3X.

I'm on Windows 10 1903
I7 2600 3.8GHZ
GTX1660ti 6GB
10GB RAM
Retroarch 1.8.2 (late December build)

Can anyone try to replicate this and see if RA uses much more CPU in full screen?

In windowed, DWM takes over the sync, adding latency and (possibly?) messing with things like hard GPU sync. I would assume that’s at the root of the difference.

I had Sync to 1, then I set it to 3 to see if there’s difference in full screen. I added runahead instances up to 6 and it dropped from 25~ to 20-18%, the game input response was amazingly fast, almost as it reacted before I actually did the commands. But, with Hard Sync and Runahead to their max, shouldn’t it increase the CPU load instead of actually dropping it? I read on other posts that standalone emulators usually perform faster than in Retroarch, I always took that with a grain of salt, so when seeing these CPU peaks I’m trying to figure out if that 30% CPU load in a simple 2D game is really the expected behavior.

Edit: I now turned off both Hard Sync and Runahead, even before loading any content Retroarch is eating up 25-26% CPU, I think it didn’t happen some time ago, how can I trace the culprit?

No core, nor any content loaded, how is it eating that much CPU without processing stuff?

Yeah, that’s not really true in a general sense. There are some things that would cause it, like non-PIC-compliant dynarecs (see: desmume) that don’t work when the core is a dynamic library and/or GL threading stuff like in PPSSPP, but RetroArch is usually as or more efficient as any standalone interface.

I would suggest hooking up to a debugger and see where all the function calls are coming from that are pushing up your CPU load.

I would suggest hooking up to a debugger and see where all the function calls are coming from that are pushing up your CPU load

How to do it?

some instructions for using gdb for it are here:

instructions for MSVC are here:

1 Like

Here’s what I did. I downloaded the latest nightly and started it, in order to get the CPU usage without interference from another application I recorded it from my smartphone. You’ll notice that without any logic, some settings are stealing lots of CPU cycles, like changing the Monochrome icons to FlatUI and back, how come?