SDL_PollEvent() slower under MacOSX 10.4?


We recently moved from 10.3.9 to 10.4.5, and have noticed that the test program
testjoystick.c runs significantly slower, updating the whole window at only
about 5 hz, while it used to run at at least 15 hz. The confusing thing is that
the old executable runs fine, but if we recompile the test suite with the exact
same makefile, we get the slower version. We even use the exact same dynamic

Any ideas what is going on? is there a new loader flag or something?

The slowdown has to do with testjoystick.c drawing little squares at the bottom
of the window in each loop. We can work around this, but would like to know
what to avoid to get the snappiest joystick performance.

Thanks for any suggestions,


OK, I figured it out. The testjoystick.c program in /test draws lots of little
blocks on the display and calls SDL_UpdateRects() after each one. MacOSX now
penalizes this, under a policy called “coalesced updates”, see the tech note

You can turn off this feature if you want, and executables compiled under
10.3.9 and earlier have it turned off by default.

Mystery solved!