A call to GCContextDrawImage
turned out to be a bottleneck in my Mac OS X application, especially on retina screens. I managed to mitigate it somewhat by Avoiding colorspace transformations when blitting, Mac OS X 10.11 SDK, but it still seems to be slower than I would expect it to be.
When investigating the stack dump with Instruments I noticed that a lot of time was spent in two functions with highly suspicious names, vImageDebug_CheckDestBuffer
which is calling into _ERROR_Buffer_Write__Too_Small_For_Arguments_To_vImage__CheckBacktrace
. See the the full stack dump below.
This seems to me like some sort of debug assertion? Am I running a debug version of the vImage library without realising it? Is there something I can do to stop these functions from sucking up all my precious cycles?