ondalabs/OLImageView — pull request #30 by ejensen (2013-07-14 23:24:43+00:00)
Title: Optimize the displayLink's frameInterval by basing it on the GCD of frame delays

By setting the `frameInterval` property to the greatest common divisor of frame delays, the displayLink calls its target less often.

For example, if a GIF has constant frame delay of 100ms (10 fps), the frameInterval can be set to 6. Resulting the displayLink's target (changeKeyframe:) being called 1/6th as many times as keeping the frameInterval at 1.