We’ve discovered a major performance issue with painting, using JUCE apps running in Big Sur - but apparently not in Catalina or other previous versions. Moving any slider or other control, or just mousing over a control, causes the entire application window to invalidate and repaint, causing every control to be re-rendered.
I’ve created a very simple JUCE project to illustrate this:
Compile this application against JUCE 6.0.5 and run on the Big Sur operating system. If you run the application from the command line, you’ll see the output debug statements. The project contains two sliders, called “thing1” and “thing2” that are spaced about 900 pixels apart. Move any of the sliders on Big Sur (or just mouse over a slider), and you’ll see that both of them are redrawing. Your output will look like this:
paint slider: thing1
paint slider: thing2
paint slider: thing1
paint slider: thing2
paint slider: thing1
paint slider: thing2
paint slider: thing1
paint slider: thing2
Run the same executable on a Catalina computer and your output should look like this:
paint slider: thing1
paint slider: thing1
paint slider: thing1
paint slider: thing2
paint slider: thing1
paint slider: thing2
paint slider: thing2
paint slider: thing2
We’ve verified this on two different Macs running Big Sur. In addition, we compiled the same code against JUCE 5.4.7. The resulting executable works properly on Catalina but fails in the same way on Big Sur, so this is not a new issue, but is some sort of Big Sur incompatibility with JUCE’s painting.
You’ll noticed that even on Catalina, when clicking on the left or right slider, the other slider will redraw once, which seems inefficient, but perhaps there’s a reason for that. That’s why the Catalina output shows “paint slider: thing2” followed by “paint slider: thing1” in the middle. But this single repainting of both controls is a minor issue compared to both controls painting constantly.
We’re working on a product with a lot of sliders and knobs, and the GUI performance on Big Sur is very slow even with no audio processing occuring, and CPU jumps up to 70-100% just moving any of the sliders, which is how we initially discovered this issue. I hope it’s solvable!
Thanks,
Dan