How Flickr Optimized Performance of Their New Yahoo! Homepage Photo Widget

(Thanks schill!) image00

Code.Flickr.net is an excellent resource for developers working on Flickr APIs. From the App Garden to helpful tutorials on the developer blog, their developer site is jam-packed with helpful information for developers.

Today Flickr’s development team details how their latest homepage addition might have bogged down the Yahoo! homepage, had they not worked diligently to prevent that from happening.

… the bottleneck was not in generating the list of photos for your most recently active contact, it was just in finding who your most recently active contact was (specifically if you have thousands or tens of thousands of contacts). What if, instead of fully denormalizing, we just maintain a list of your recently active contacts? That would allow us to optimize the slow query, much like a native MySQL index would; instead of needing to look through a list of 20,000 contacts to see which one has uploaded a photo recently, we only need to look at your most recent 5 or 10 (regardless of your total contacts count)!

Hop on over to the Flickr blog to get the full story, along with very clear reasoning behind why they implemented the current strategy. Because the Yahoo! homepage is accessed by millions of visitors, every addition has to be tight. We hope Joshua’s explanation of how his team solved this for the Yahoo! homepage will be helpful as you design for performance on your own site.