I'm using an NSImageView to display an animated GIF with around 80 frames, each frame being 20ms long. NSImageView can display the GIF animation right 'out of the box', but the problem is that it needs too much CPU, around 10% continuously (on my core i5 proc). Instruments shows that it spends a lot of CPU time decoding the GIF.
To make it more efficient, I have tried the following without much success:
putting the frames inside a QTMovie and playing it (uses 4% for my process and another 15% for the QTKitServer process that plays the movie)
drawing directly to the view with CGContextDrawImage (~5% CPU usage) - I didn't export the GIF's frames, I just created a CGImageRef from a 30x30px .png I had lying around.
I don't know what else to try. Subclassing NSImageView and somehow caching the images sounds like a good idea but, alas, I'm a beginner in Cocoa... Any ideas would be much appreciated. Thanks!