Loading all these thumbnails individually is blocking available http threads for other things (like the static maps). This is an issue in the browser and in mobile. We need a way to deliver them in larger batches or all at once, such as via image sprites or maybe base64 encapsulated in json, and client-side components that inject these into the DOM where needed. The json packaged base64 approach could potentially work better within angular, since we can bind the values to species objects that we can keep track of in the browser cache. Images fetched via sprites are apparently harder to cache.
The first step to implementation will be to create a thumbnails api that accepts a list of scientific names and rolls the images together with one of the above methods.
Potential issues:
- It may be difficult to efficiently resize to thumbnail from what is in the blobstore -- Google is currently doing that for us using the getServingUrl method, but that would mean then pulling images through AppEngine using urlfetch rpcs, which are also thread limited. We will have to experiment with that vs pulling from blobstore directly and resizing using the Images api.
- We are not actively caching species-level information on the client. In order to avoid always asking for all thumbnails needed, we will want to start doing that, which means coming up with ways to invalidate those cached items.
Loading all these thumbnails individually is blocking available http threads for other things (like the static maps). This is an issue in the browser and in mobile. We need a way to deliver them in larger batches or all at once, such as via image sprites or maybe base64 encapsulated in json, and client-side components that inject these into the DOM where needed. The json packaged base64 approach could potentially work better within angular, since we can bind the values to species objects that we can keep track of in the browser cache. Images fetched via sprites are apparently harder to cache.
The first step to implementation will be to create a thumbnails api that accepts a list of scientific names and rolls the images together with one of the above methods.
Potential issues: