Dropbox Oct 27, 2014

Building Carousel Part III: Drawing Images on Screen

Article Summary

Tina Wen from Dropbox tackles a deceptively hard problem: how do you render tens of thousands of photos at 60fps without turning your app into a slideshow of gray squares?

When building Carousel, Dropbox's photo app, the team hit a wall with image rendering. Decoding three 256px thumbnails took 30ms, but smooth scrolling requires each frame to render in just 16ms. The naive approach would drop frames constantly. Here's how they solved it.

Key Takeaways

Critical Insight

By combining low-res thumbnails on the main thread with background queuing of high-res images based on scroll velocity, Dropbox achieved smooth 60fps scrolling while maintaining image quality.

The article reveals the specific scroll velocity detection technique they used to decide when to swap between thumbnail resolutions.

Recent from Dropbox

Related Articles