High CPU while using themes with background videos after emulator launch
Environment
Launchbox 7.4
Windows 10 Anniversary Update
Frequency
Always
Description
If you launch a game while a background video is playing, the BigBox will continue to consume CPU cycles in the background. This impacts many emulators.
Steps to Reproduce
- Select a theme with a video background such as CriticalZone
- Use a Games List view with a video background, such as Horizontal Wheel 1
- Map a button to launch a game directly from the Games List view (Note, I did not test, but suspect similar behavior when enabling "Skip Game Details Screen")
- Launch a game from the Games List view
Comments (9)
-
reporter -
reporter - changed title to High CPU while using themes with background after emulator launch
-
reporter -
reporter I updated to the latest beta and see no changes in behavior.
-
Copying my reply from issue #2295:
I've been getting this too, and from what I can tell, it's only happening with VLC as the video playback engine. I hooked up a profiler to BigBox.exe to see if I could tell what was going on. From what I can gather without the debug symbols, it looks like VLC might still doing all the work to render video frames while the game is running. There are a couple threads spending almost the entire time busy in native code and making inexpensive callbacks to VideoDisplayCallback and VideoLockCallback.
-
repo owner Thanks guys, yes, it's VLC. I put a note in the beta testing thread:
"Also, I added some optimizations to reduce the CPU usage while Big Box is not in focus. That said, I'm not 100% happy with it yet, so more work is needed in that area, specifically with VLC. I get 2% CPU usage in Big Box while VLC videos are paused in the background and games are running, which doesn't really affect my systems, but probably has more of an effect on slower systems, so it is something I need to come back to. Basically, VLC is repainting the screen for the videos even while they're paused, which is just how VLC works. Worst case scenario is we could just stop and get rid of the videos when games are launched, which would solve the issue, but it would also ruin the pause and resume functionality after coming back from playing a game."
Interested in hearing if beta 8 is any better. I think I'll probably end up just stopping the videos instead of pausing them while running games, which will probably get rid of the rest of the CPU usage.
-
repo owner Here's the beta testing thread if you guys haven't seen it yet: http://forums.launchbox-app.com/topic/32771-launchbox-beta-testing-68/?page=79#comment-220383
-
reporter I'd say make it a toggle. If there is a better experience if you have a beefy enough machine no reason to kill it completely. Maybe have an option to "stop videos on launch" that can be enabled/disabled.
I don't know why it's impacting games so much. It's not like the CPU is pegged, but something about what it's doing definitely causes stuttering in games that isn't there otherwise.
-
Just updated to the latest beta, and it seems to have done enough to fix the choppiness in game for me, though the cpu usage is still higher than I'd ideally like to see.
- Log in to comment
Update: I'm not 100% certain that the background videos are causing high CPU usage, but themes with them certainly contribute. I'm seeing BigBox use 10-20% while in the background after the game launches. Themes with background videos run pretty choppy (not 60fps). Themes with no background video run perfectly smooth, but still consume some CPU (2-4%) after the game launches. Perhaps it's the text scrolling in the game details? You can still see it scrolling in the background if you launch windowed.
These are my hardware specifications: