Optimize image caching

Ideas for improvements and requests for new features in XnView Classic

Moderators: helmut, XnTriq, xnview

Post Reply
Arlekin
Posts: 4
Joined: Thu Nov 30, 2006 4:55 am

Optimize image caching

Post by Arlekin »

Sorry for my eng. i'm from russia.
I think that you can add some good optimization of caching of images:

First of all - xnview must detect direction of image scrolling. If i scroll images backward then one image ahead is previous, when i scroll forward - one image ahead is next. This dont need more memory.
But best way (imho) is to cache both images (previos and next). May be make it optional, because of using more memory.

Second optimization is - to not just cahce file, or build next image in backround, but and resize it in background - this is the best. Because when i disable good resizing - images looks ugly. When i enable nice resize algoritm - scrolling become too slow (i say scrolling because i switch images with mouse wheel). But when i looking at current image - there is enough time to load, build and resize next. And when it already resized - it needs less memory. (i think that this is good idea to leave current image in memory in resized mode, because of less memory and because of it just ready to show, no additional operations required)
Of course if i using zoom or any image editing - then i need original (not resized) image in memory, BUT while i looking at it and deciding need i zoom/edit it or not - there is some time to do some load (first of all load current image in original size, and then load, build and resize next).

In total i suggest not to store original picture in memory but store resized image just ready to be showed at any time without any modifications. Original picture needed only for current image. In that way image switching will be fastest. And it looks so nice. It will be powerfull and fast viewer.

PS: I like xnViewer so much. it is the best (in comparing with other viewers) - thats why i interested in it and want to help you make it better.
PPS: In that way you may add more efficient resize algorithm for example lanczos - which requested in other topic
Post Reply