CubeBrowser / cube-explorer

browser based exploration of iris cubes
BSD 3-Clause "New" or "Revised" License
8 stars 12 forks source link

Caching - a hybrid static/dynamic approach? #31

Open niallrobinson opened 8 years ago

niallrobinson commented 8 years ago

Has there been any consideration of caching rendered images? e.g. if I move the slider to the previous frame, it could reload a png rather than re render.

Similarly, is there any room for pre-rendering a whole cell so that its more responsive?

Its just an idea - if its practically hard, or conceptually problematic, then fair enough

philippjfr commented 8 years ago

Has there been any consideration of caching rendered images? e.g. if I move the slider to the previous frame, it could reload a png rather than re render.

This is actually the behavior we had before introducing a real dynamic mode. The reason why we removed it is twofold, a) in dynamic mode at least there is no guarantee that the same key requested multiple times generates the same output and b) you don't always want to accumulate a bunch of images in the browser. That said I think the hybrid approach is still worth it in some cases as the output of a single frame shouldn't ever change in this project. It should be fairly easy to add a cached mode which accumulates plotted frames.

marqh commented 8 years ago

i think this could be well worth considering, as part of the performance mix

niallrobinson commented 8 years ago

👍 agreed - in our instance, I think it could be useful