play/play — pull request #199 by joeyw (2012-11-05 00:25:32+00:00)
Title: V3 Cache album artwork.

Make album artwork and play a lot faster. Right now there are requests that have to shell out for every single song on a page which results in insane load times and duplicated downloads.

This changes it so each song has an `art_file` that is a sha of the artist name and album name. This gets stored in `/tmp/play/cache/album_art/SHA.png`. Instead of passing the song file path to get the artwork, the `art_file` is used so only 1 request per album needs to be made instead of each song.

Markdown tables aren't used enough, heres a search for a band with 194 songs in the results:

|branch| cache | requests | data downloaded | time |
|:----------|:----------|:----------|:----------|:----------|
| v3 | none | 197 | 14.73MB | 20.60s |
| cache-album-art | cold | 20 | 1.15MB | 7.82s |
| cache-album-art | warm+browser cache | 20 | 238.84KB | 5.19s |

Damn that looks a lot more important than just text.