Sluggish graphics performance on MAC OSX


#1

We get really slow performance on some of our MACs here at the office, running the same application on the same machine on windows through parallel desktop gives snappy performance.
There seem to have been a rise in issues for a lot of developers with the newer MAC OSX due to some apparent change in the underlying handling of paint events.
Is this something that is confirmed to affect JUCE as well and if so, is there something being done about it?
I couldnt find any other threads about it on the JUCE forum so is this something that people in general isnt affected by here?

There is a long thread about it where they are still trying to iron out these issues on Cubase.
https://japan.steinberg.net/forums/viewtopic.php?f=250&t=108500


#2

Some more testing.

Software renderer (default)
Mac 10.9.5: Works great, snappy performance, no glitches.
Mac >= 10.10: Starts showing graphical glitches (closing a window by clicking a button leaves a black hole at the position of the button until the window disappear, which takes a while…) as well as the overall performance has gone down considerably, everything just feels slow.

OpenGL renderer.
Mac 10.9.5: incredibly slow, basically unusable, we have some hover effects that when are being rendered completely locks the entire OS. (spinning ball of death until mouse stops moving)
Mac 10.10 / 10.11: Slower but still usable (well, still incredibly slow compared to software rendering in 10.9.5), all glitches are gone.
Mac 10.12: Performance is about the same (compared to software renderer in 10.12), all glitches are gone.


ImageButton Repainting Premature/Timing?
#3

Thanks for the clear info.

Are these different machines you’re using to test the different OS versions? It seems incredibly odd to me that there’d be any difference at all in e.g. the software renderer if the CPU is the same (?)


#4

Yes these are 4 different machines with a different OS on each, however they are all about equal in their specs, the CPU specifically is very close between the 4 machines ranging from 2.6 - 3.1 GHz, all running Intel I7.
The slowest amongst the bunch of machines is the one running 10.12 and the OpenGL performance is best on that machine.

As I understand it (please correct me if im wrong) is that Apple reduced the time available for paint events (and maybe also the actual refresh rate?) and if we cannot finish rendering during that time, the OS will simply discard the paint event and that is what we see starting at 10.10?

What im wondering basically is if there is something we can do to remedy this behavior.


#5

Yes, I think that happened around 10.10.

Really don’t think there’s much you can do. But why are you using software/GL rendering rather than CoreGraphics, which should perform better on all these OS versions?


#6

Thats a bummer if thats the case. So basically MAC users will have to learn to live with laggy applications from now on?

Yeah sorry I was unclear there, I meant we use the default renderer = CoreGraphics on MAC


#7

Well, we can’t improve the performance of CoreGraphics, that’s pretty fundamental stuff. But you can avoid the discarded paint problem by just making sure your paint routine isn’t too slow. The OS is pretty lenient, it gives you at least a few hundred milliseconds to finish, and if your painting is taking longer than that, you should probably be doing some serious optimising anyway.


#8

We experienced graphical performance issues (along with decreased responsiveness of user input ) as a result of using lots and lots of timers (mainly for polling to sync parameters).

So one possibility could be that the message queue is stuffed with events resulting in less repaints coming through.


#9

Yes, that’s a really good point - always do some careful profiling when you have repaint performance issues, because events (timers or otherwise) can often be the culprit.


#10

Please see this thread for a recent messagemanager fix which improves performance when there are multiple OpenGLContexts active: