Closed zinigor closed 8 years ago
The algorithm used to format a photo's shutter speed to display it as a fraction rather than a real number is inefficient. For a fraction of 1/4000 it takes more than 4000 iterations: https://github.com/Automattic/jetpack/blob/master/modules/carousel/jetpack-carousel.js#L999
While it runs fast enough not to cause page freezes, there is still room for improvement.
Related: #692 and #1087
The algorithm used to format a photo's shutter speed to display it as a fraction rather than a real number is inefficient. For a fraction of 1/4000 it takes more than 4000 iterations: https://github.com/Automattic/jetpack/blob/master/modules/carousel/jetpack-carousel.js#L999
While it runs fast enough not to cause page freezes, there is still room for improvement.