<<Great performance has always been an obsession at Google and it's something that we think about and work on everyday. We want Gmail to be really fast, and we keep working on ways to make it faster. Gmail's architecture eliminates many of the delays in reading mail by employing techniques like prefetching, but recently we decided to take a close look at some other key parts of Gmail to see if we could speed things up.>> http://gmailblog.blogspot.com/2008/05/need-for-speed-path-to-faster-loading.html |
« [...] we consolidated small icon images into single meta-images, a technique known as http://en.wikipedia.org/wiki/Spriting »
Cached sprites – I get it. But "combinatorial" sprites??? How would these be made to display a PARTIAL icon bitmap, via clipping, or some client-side Javascripted recreation/splitting of them into individually adressable targets in memory? Since we're talking small images, wouldn't JS execution overhead potentially eat up any savings due to a leaner datastream? |
The display of each individual icon image is usually done using CSS positioning, rather than by invoking Javascript. It's pretty efficient. |
I get it, CSS-clipping of larger static bitmaps, piece 'a cake. But why do they call it "spriting," a word associated with dynamic movement? |
Hmm. Maybe they use the word "spriting" to indicate the dynamic movement of the master image when they're changing one icon to another (e.g. an unstarred Gmail message becomes starred).
In that case, Javascript is back in the picture anyway.
I gotta say, everything else on my computer slows to a stop when Gmail loads, even though Gmail itself is snappy. |
Gmail's still slow for me when I open it and want to do something, like send a quick email or read an email... perhaps not despite, but because of all the prefetching? |
Ianf: It's called spriting, because sprites were the original technique for creating moving characters in games by having stop-frame pictures of the character in various positions, these would typically be stored in one buffer, with the various positions selected by selecting that interval of the buffer which made for fast selection and transition of the characters movements. Ah, the memories of assembly game programming – my MSDOS pacman still kicks :)
Characters in (2D) games became known as sprites, but the technique for selection sprites fast is similar to that used to store multiple icons and using CSS as GMail does. |