Till now I happily ignored its existence and my software worked fine on windows. Then after 40k+ lines of code i build my program on mac, and the GUI lags greatly. Jules suggested it is because I am hammering the event queue with messages (previous thread for context: On latest tip, GUI on OSX is much Laggier than on Windows (w. Video)).
Now, I’ve been scouring the forum and JUCE doc, but I am none-the-wiser: Is it that when I call repaint, use AsyncUpdaters, the MultiTimer and other timers, all such messages aggregate into this one queue?
I use all of the above allover my code, without doing much managing to consolidate messages, since I assumed there was some sort of aggregation and management of the timing of these internally in JUCE/OSX/Windows that I needn’t worry of.
AsyncUpdate says in its documentation that such consolidation happens, I assume repaint too, no?
Since I apparently am doing something wrong, what strategies should I use to avoid problems? Should I have my own queues in which I consolidate and re-prioritize changes before calling repaint, triggerAsyncUpdate?
And if yes, how would I go about doing that with repaint, without essentially reinventing it? Because as I understand it, whenever any component needs repainting, I call repaint(), and it is then up to the framework to figure out if only one component needs updating, or also its containers down the tree, and how often repaints should happen to maintain a good framerate. No?
Any tips are greatly appreciated!