thumbnail-zoom
thumbnail-zoom copied to clipboard
Load images faster or pre-load images
A couple users have suggested on the Mozilla add-ons site pre-loading images so they can display faster. They say Hover Zoom in Google Chrome does that.
It's not a bad idea, though it would increase network bandwidth and CPU time (and thus battery usage in laptops) since it'd often load images which the user never ends up showing. It'd also have that impact on the site's web server.
It might also be tricky to get it to properly autoload when more thumbs are shown dynamically, e.g. by autopager or by sites which load content dynamically like Facebook and Twitter.
Test case: links to very high-rez image: http://www.reddit.com/r/pics/comments/rsgsh/the_first_thing_i_saw_when_my_new_camera_came_but/
Images on this site aren't that big, but the site is always slow (at least from North America): http://www.fotop.net/dreamer/ka
Also requested by Thomas M. via email 5/1/2012.
Note that this issue is unrelated to the idea of updating the display more frequently while the image is loading; for that see Issue #44: Large images load in too large chunks; appears slowly
Firefox has built-in pre-fetching support, if the document contains the appropriate tags. A possible approach is for TZP to add those tags (but most of the work would be in processing the entire document on load to find the thumbnails; currently it only does that on an as-needed basis based on mouse movement).
See https://developer.mozilla.org/en/Link_prefetching_FAQ
Issue #138 is a duplicate of this; here are notes from that issue:
Its effectiveness may be limited by the size of the configured RAM and disk cache, and it could potentially increase Firefox's memory use, potentially slowing the browser or computer, so we'd have to be careful, but it'd probably be OK if the amount prefetched is capped.
It would require changing how TZP works since currently it determines the full-size image only when a thumb is hovered; it never actually does a full search for all the referenced full-sized images. Fortunately part of that change has already been made in the imgurAlbums branch.