Dropbox Aug 6, 2014

Building Carousel Part II: Speeding Up the Data Model

Article Summary

Dropbox engineers faced a brutal reality: reading 5,000 photos from SQLite took a full second on a Nexus 5. For users with 100,000+ photos, the standard approach would be unusable.

This deep dive from Dropbox's Carousel team reveals how they built a data model that could handle massive photo libraries without blocking the UI. The solution required rethinking everything from SQLite cursors to in-memory data structures.

Key Takeaways

Critical Insight

By replacing full array copies with shallow event snapshots, Dropbox reduced the cost of hiding a single photo from nearly one second to negligible time, even with 50,000 photos loaded.

The article hints at an even trickier challenge: keeping a sliding window of actual photo thumbnails in memory as users scroll through decades of photos.

Recent from Dropbox

Related Articles