Open r4v opened 4 years ago
My tougth on that is that not all images need to be cached. For small images generation of preview is fast but for ie. 30MB jpeg it can take some time. The idea is to have some threshold value in setup, minimum size of image that needs to be cached.
Sorry but i don't understand what you want to say.
I don't think that cache is generated on directory loading at this moment, that could be useful but need to consider directories with huge collection of large files. May by some queue to process n files at given time would be solution.
My idea is to generate cache for large images (greater then...) and for small images just show preview on the fly
@r4v, it's a good idea. Currently scope.sh
has a couple paths where it simply displays a file rather than create a cached preview, so this definitely doesn't sound too hard to add. One problem another user has brought up in another issue is that ranger always checks if there's a cached preview and then starts scope, if scope then says "display the file as-is" that's a bunch of unnecessary time spent. I think their solution was to create a symlink in the cache that points to the file so the second time ranger has a cache "hit" and doesn't even have to start scope.
I have some thoughts about image preview cache. For now, scope.sh previews are generated for svg, exif rotated images, pdf, video etc. with plain convert without any optimisation.
My idea is to enhance image cache by adding two options:
convert -quality ${CACHE_QUALITY}
This could improve speed / user experience when user browse folders on network share, slow flash drive etc.