Page 1 of 1
Thumbnail cache indexes search results separately from actual file locations
Posted: 22 Mar 2022 20:36
by c0thirty
I'm not sure if this is a bug or intended behavior, but it seems odd. When caching thumbnails, the program creates a file for each directory to be cached (makes sense).
So if I delete my thumbnails directory, and create a folder let's say D:\images\ and refresh the thumbnails, I get Data\Thumbnails\XYThumbs.txt with a line like:
D:\stuff\images\|220x154z|4ef89a22852a4342e5fa406e380439a0 and a corresponding 5MB file containing the actual thumbnails in this example.
But if I then do a quick search in that same directory, or enable Branch View, it doesn't use the cached thumbnails for those images, instead it generates an additional cache entry and re-generates all those thumbnails:
D:\stuff\images\*|220x154z|5f15f21292e3df1e65e900cea454ebc1
D:\stuff\images\|220x154z|4ef89a22852a4342e5fa406e380439a0
So now there's 10MB of cached thumbnails. And the pattern repeats, if I go up a directory and search there, I get a third entry D:\stuff\* and 15MB of duplicate thumbnails.
Is there a way to make XYplorer always cache thumbnails in an entry based on their actual file location, rather than whether the list view is a search result or branch view?
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 11:28
by admin
Yes, it has been designed that way for many years. I know what you mean, but currently I have no plans to change a well oiled and running system.
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 16:15
by klownboy
admin wrote: ↑30 Mar 2022 11:28
Yes, it has been designed that way for many years. I know what you mean, but currently I have no plans to change a well oiled and running system.
I noticed how search results are handled in the thumbnail database though I don't cache search results myself. You may be asking for trouble if you were to try and combine search results, branch, and normal folder thumbnails caches for the same folder. As mentioned, search results are not necessarily cached unless you have that option checked in Configuration. If you do cache search result, would the user necessarily want those results tied to a normal cached thumbnail folder? Search results change, the user may want to delete search results but not the normal folder cache etc. I can just see it being a headache.
Don you've probably seen this girl, Laura Lace on guitar...unbelievably talented...keep watching.
https://www.youtube.com/watch?v=XZgiNnGB8m4 and this one
https://www.youtube.com/watch?v=FVa37f67Hnc
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 17:01
by c0thirty
klownboy wrote: ↑30 Mar 2022 16:15
You may be asking for trouble if you were to try and combine search results, branch, and normal folder thumbnails caches for the same folder.
Why? One cached entry per file. Makes sense to me.
klownboy wrote: ↑30 Mar 2022 16:15
As mentioned, search results are not necessarily cached unless you have that option checked in Configuration.
Regardless of caching thumbs
from a search result, it shouldn't be a problem to pull the existing image's already-generated thumb from its absolute path cache instead of regenerating one when it already exists.
klownboy wrote: ↑30 Mar 2022 16:15
If you do cache search result, would the user necessarily want those results tied to a normal cached thumbnail folder?
Yes. It makes perfect sense to me to cache the result based on the file's absolute path, not on whether the search bar contains an arbitrary search pattern or branch view. The file is always the file, it isn't going to mutate just because it's being viewed as the result of a search. 1 file = 1 cache entry
klownboy wrote: ↑30 Mar 2022 16:15
Search results change, the user may want to delete search results but not the normal folder cache etc.
This is already a problem that exists though. Move or delete a file in windows explorer that has a cached thumbnail, and presumably Xyplorer leaves the stray thumbnail around forever unless some sort of manual cleanup process is initiated. Users can accept this as a expected limitation, as the alternative would mean frequent automatic scanning for missing files, which is typically not ideal. Whether a search result changes or is initiated from a different parent folder should be of no consequence to the file itself, however. Only if the file itself is changed should the issue of its cache come into play, and this is independant of any search results.
klownboy wrote: ↑30 Mar 2022 16:15
I can just see it being a headache.
It's a headache having infinite thumbnails generated per image based on arbitrary search patterns when a cached thumb already exists. Grinding my CPU to a halt regenerating 100s of thumbnalis that are
already cached on my disk every time I press F3 is a headache. The current behavior leads to redundant file bloat, increased CPU time, and just seems logically wrong.
admin wrote: ↑30 Mar 2022 11:28
Yes, it has been designed that way for many years. I know what you mean, but currently I have no plans to change a well oiled and running system.
Ok, too bad.
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 17:21
by Horst
I agree with c0thirty.
The thumbs cache should be ones per file path regardless where and why its displayed.
Only if a file date changes it needs to be regenerated.
All tools I know work like this with one large database for all entries.
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 17:25
by klownboy
Hi c0thirty, it makes sense obviously to utilize the same cached thumbnail for various situations rather than regenerating them for a different search or branch operation. Looking at it from the aspect of
thumbnail maintenance, it would actually simplify matters. Anyway, I wasn't so much arguing against the idea (or at least I shouldn't have been) so much as I was thinking it would be a headache for Don in revamping the way the thumbnail cache system currently works.
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 19:47
by admin
Well, she sure can play, but it's not so much my thing personally. I would call this academic rock. She perfectly follows the rules, but rock'n'roll is more about the opposite, right?

Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 30 Mar 2022 20:36
by klownboy
admin wrote: ↑30 Mar 2022 19:47
Well, she sure can play, but it's not so much my thing personally. I would call this academic rock. She perfectly follows the rules, but rock'n'roll is more about the opposite, right?
I see what you're saying, but since I'm into other guitar playing forms and styles, like classical, I can really appreciate the raw talent involved in playing like she does. I really doubt she simply read and played off some sheet music for those classical songs. But, can she create and do more of her own thing? Who knows, it remains to be seen? I just stumbled across that link yesterday.

Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 31 Mar 2022 15:49
by c0thirty
klownboy wrote: ↑30 Mar 2022 17:25
Anyway, I wasn't so much arguing against the idea (or at least I shouldn't have been) so much as I was thinking it would be a headache for Don in revamping the way the thumbnail cache system currently works.
Fair enough
Would be cool to see someday, though. I'm already loving how XYplorer replaces (almost) every feature of image browsers like ACDSee.
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 31 Mar 2022 17:36
by klownboy
c0thirty wrote: ↑31 Mar 2022 15:49
I'm already loving how XYplorer replaces (almost) every feature of image browsers like ACDSee.
How true. I'm not a photographer by any means, but I take loads of photos. I just love using XYplorer to view them. If I'm not using MDBU or XY's previews, I use Image Eye
https://fmjsoft.com/imageeye.html#main as my default viewer (double click viewer only not to edit images). It's super fast, light weight, lean, mean and clean with borderless and no title bar views (and free).
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 20 Apr 2022 19:20
by 1024mb
+1 for this feature

Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 20 Apr 2022 19:24
by 1024mb
Another thing, Don could you make search results honor the "Create all thumnails at once" option?
Re: Thumbnail cache indexes search results separately from actual file locations
Posted: 21 Apr 2022 03:45
by kiwichick
1024mb wrote: ↑20 Apr 2022 19:20
+1 for this feature
Me too
