We are having GUI performance issues on macOS 10.13 vs. Windows 7 & 10. I have read through several other forum threads about others having similar issues, but it seems none of the things that were discussed there would apply to what I am seeing.
I created a very small sample application to show the issue. After using Projucer to create the framework of the app, I customized maybe 25 lines of code to show the problem. On Windows, if I set my timer to 16ms (60Hz), the app uses something like 3% of the CPU. On macOS, it uses 75% of the CPU and cannot run at 60FPS. (There are notes in the source code about the testing I have done.) The app draws 256 ‘meters’ (so 512 rectangles total) and it is completely hosed on macOS and Windows isn’t even breathing hard.
I have done performance analysis on both versions, and the macOS version spends all of its time in the paint function dealing with the 512 rectangles. At this point I cannot think of a way around this to speed up the redraw code other than to scrape JUCE and use something like Metal on macOS. I talked with Jules about this at an ADC a while back, and he suggested using RectangleList which did not help the problem.
I have put the source to the TestUIApp on dropbox: https://www.dropbox.com/s/3fgyyob87xjlkbq/TestUIApp.zip?dl=0
There is a secondary issue that I also discovered. If I try and be smart about only invalidating the part of the rectangle that is actually changing, this actually slows the app down to an unusable point when the mouse cursor hovers over any of the rectangles. There is a checkbox in the app to turn on/off the ‘feature’ so you can see the issue for yourself.
Thank you in advance for any help or suggestions you might have.
David A. Hoatson