On Wed, Apr 2, 2014 at 1:34 PM, Pedro Côrte-Real <pe...@pedrocr.net> wrote:
> 1) A thumbnail mipmap cache, limited to a fixed max image size (say
> 640x480) that gets calculated on-demand and never deleted. All these
> mipmaps are stored to disk and a part of them is brought to memory as
> needed to display.
> 2) A full-size image cache used for the results of raw conversion, to
> speed up the lighttable "Z" view and opening the darkroom for an
> image. Again this cache is stored to disk adn can be size limited to N
> photos by the user or left unbounded if the user has a lot of disk
> space to spare.

Having read through the code in more detail here's a possible
suggestion on how to do the minimum possible thing that may just work:

Leave the DT_MIPMAP_F and DT_MIPMAP_FULL levels just as they are.
For levels DT_MIPMAP_0 through DT_MIPMAP_3:
1) whenever an image is about to be removed from the cache write it
out to disk before
2) whenever you have a cache miss try to see if the image is on disk
before recreating it from the original image
3) whenever an image gets changed remove it from the disk
4) potentially change the sizes so that DT_MIPMAP_F can be a large
size and yet the thumbnail levels be smaller (say 800x600 or lower)

This will make the penalty for a cache miss much lower (a random read
from disk of a much smaller file than the original image). The cost
for this is writing the files to disk, but that gets amortized over
the life of the collection, which should be long, especially if
DT_MIPMAP_3 is set to a fixed size so that changing the thumbnail
sizes doesn't invalidate these cached files.

Pedro

------------------------------------------------------------------------------
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to