JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: [Juce 8 - UI] Critically slow UI / high GPU consumption

Open benkuper opened this issue 4 months ago • 1 comments

Detailed steps on how to reproduce the bug

Hello, in my transition to Juce 7 to Juce 8, i found that the same code will just be super slow, sometimes unresponsive in Juce 8. I figured that using my dedicated GPU (RTX 4080M with 12GB, not so bad), it would improve, but would then use up to 30% of this GPU, with an almost empty session and not activating OpenGL rendering, and the intel GPU would still be around 60-70% ! For reference, the same file and app compiled with Juce 7 would take 1% on the nvidia gpu and a bit more on the intel gpu, and the intel gpu could go up to 10%-20% when redrawing the interface constantly.

Few indicators : Popup menu are just lagging a lot When I play a timeline and I try to close my software, I'm being asked to save or not, but I can't even click the button until the timeline stops playing (and redrawing).

I had optimized a lot this UI to not overload anything, with generalized timers to avoid drawing too much, etc. This used to be very efficient in both UI smoothness and CPU/GPU efficiency. But in JUCE 8, it's just bad. I may have not read enough about migrating from one to another, but it sure seems something is wrong. In any case, if anybody has insight on this I'll be happy to hear them !

Here is a video showing the 2 apps performance comparison, one with version 1.9.24 of my software (Release mode, JUCE 7), and the second one with version 2.0.0b1 (same code, Release Mode JUCE 8, just bumped the version). Both are not using OpenGL to renderer the window, but using opengl is just helping a bit while taking a huge it on GPUs.

https://streamable.com/xwvy22

What is the expected behaviour?

Smooth UI and not lagging/unresponsive 30% of my monster GPU when not doing anything

Operating systems

Windows

What versions of the operating systems?

Win 11

Architectures

64-bit

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • [X] I agree to follow the Code of Conduct

benkuper avatar Oct 11 '24 14:10 benkuper