Thumbnail cache indexes search results separately from actual file locations

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Thumbnail cache indexes search results separately from actual file locations

Post 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?

admin
Site Admin
Posts: 66620
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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.

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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

c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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.

Horst
Posts: 1400
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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.
Windows 11 Home, Version 25H2 (OS Build 26200.9278)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1423b (x64), Everything Toolbar 3.2, Listary Pro 7.0.0.9 beta

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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.

admin
Site Admin
Posts: 66620
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail cache indexes search results separately from actual file locations

Post by admin »

klownboy wrote: 30 Mar 2022 16:15 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
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? :)

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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. :)

c0thirty
Posts: 32
Joined: 27 Oct 2021 14:28

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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 :D
Would be cool to see someday, though. I'm already loving how XYplorer replaces (almost) every feature of image browsers like ACDSee.

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Thumbnail cache indexes search results separately from actual file locations

Post 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).

1024mb
Posts: 230
Joined: 14 Dec 2018 23:26
Location: Windows 10 @ 100%

Re: Thumbnail cache indexes search results separately from actual file locations

Post by 1024mb »

+1 for this feature :tup:

1024mb
Posts: 230
Joined: 14 Dec 2018 23:26
Location: Windows 10 @ 100%

Re: Thumbnail cache indexes search results separately from actual file locations

Post by 1024mb »

Another thing, Don could you make search results honor the "Create all thumnails at once" option?

kiwichick
Posts: 701
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Thumbnail cache indexes search results separately from actual file locations

Post by kiwichick »

1024mb wrote: 20 Apr 2022 19:20 +1 for this feature :tup:
Me too :tup:
Windows 10 Pro 22H2

Post Reply