Almamu / linux-wallpaperengine

Wallpaper Engine backgrounds for Linux!
GNU General Public License v3.0
1.59k stars 61 forks source link

[Regression] Performance of scenes drops to 1FPS. #158

Closed vaxerski closed 1 year ago

vaxerski commented 1 year ago

After b69ce8ba577d17ff4281f310176d3a14b934dae4 the performance of scenes drops to ~1FPS on my system. Previously, it's solid. Both Xorg (thru Xephyr) and XWayland.

Worth noting that's in NORMAL_WINDOW mode.

Tested with further commits, but it's odd:

It probably is a driver issue, possibly some focus detection?

Almamu commented 1 year ago

Can you try to run the last commit available with the argument --no-fullscreen-pause and see if the issue persist?

That should disable the checks for other apps being full screen and is the only thing that might be making the app go so slow...

In the meantime I'll review the output code to ensure nothing stupid made it's way in...

vaxerski commented 1 year ago

--no-fullscreen-pause does not change anything, it seems. Still 1 fps.

Putting a log on swapBuffers: indeed, one double swap per second.

vaxerski commented 1 year ago

Narrowed down: CPulseAudioPlaybackRecorder::update is extra slow and just completely killing the frametimes.

Worth noting probably thus that I am running pipewire.

Almamu commented 1 year ago

Could be the calls to pa_mainloop_update as they block until something is ready to process, if you're not using pulse there won't be anything to process and block. Blocking should not happen anymore, can you test it with this change? 37b40ec29f97a75bb2b3ddcb41843735b30a5e70

vaxerski commented 1 year ago

Seems to be fixed. Thanks!