Sluggish sliders on iOS

Similar to this post from 2011 I’m experiencing very sluggish and jittery response from the rotary sliders in an iOS audio app I’ve been working on. At first I thought it was the custom look and feel that was slowing things down (profiling was showing a lot of time spent there), but switching to the default style there is very little difference. When compared to other iOS audio apps with similar controls (which are super smooth and responsive), my JUCE app’s controls feel very awkward to use. Like there is a very slow refresh rate.

Are there any tips to improve the GUI performance on iOS?
I’ve also tried using OpenGL which didn’t seem to make much difference (as expected as Core Graphics is on par with OpenGL for this kind of thing).

Not noticed anything myself - does the same happen with the demo plugin?

No, the JUCE Demo does not exhibit this problem. It might be due to too many paint calls - there are input meters are regularly repainted, this might be triggering more repaints than is needed. Also, perhaps freezing the repaint timer on mouseDown might help matters…

I’m painting at 30FPS with no problems. I noticed that using an OGL context slowed things down considerably, so for our iOS ports, I remove the OpenGL stuff entirely.

One point to consider, though: I only paint the background and meters at 30FPS. I only update the sliders if there’s a parameter change. (The old VST method, which seems to work here.) When I update the sliders at whatever I’m painting at, things tend to slow down a bit.

If you go grab our Rough Rider 2 out of the app store, which is free, everything but the knobs is done in the paint command. (Including all the text.) There are no images; it’s all procedural. Granted this is a simple plugin, but it demonstrates a 30fps repaint() call.


I just verified that removing the openGL module does in fact fix the problem.

My situation is a bit different since I am using JUCE on iOS inside of a native iOS app, which uses openGL on it’s own outside of JUCE.

I suspect the openGL context setup on the native iOS side could have been in conflict with the JUCE openGL context setup.

I also just had a client’s JUCE iOS app that was very sluggish, and was using an OpenGLContext. Removing that fixed the sluggish behaviour.