Bug: TC writes thumbnail cache but never uses it

English support forum

Moderators: white, Hacker, petermad, Stefan2

Korutz
Junior Member
Junior Member
Posts: 10
Joined: 2020-11-07, 15:44 UTC

Bug: TC writes thumbnail cache but never uses it

Post by *Korutz »

Thumbnail cache appears to be useless, because it is recreated every single time new files are displayed.

I have confirmed it by doing a simple test:

1. Add some images to a folder.
2. Enter folder in Thumbnail View, you should see thumbnails loading for the first time, it's fine.
3. Check tcthumbs.idb modified date - it should be current time.
4. Wait one minute.
5. Go one level above.
6. Enter folder with images again, they are reloading again, should load instantly from cache.
7. Check tcthumbs.idb modified date - it is current time even though it was cached just a minute ago!

TC is evidently unable to use its cache. How do I fix it?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Horst.Epp »

Not confirmed here
So there is nothing to fix
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *ghisler(Author) »

Depending on your virus scanner, loading the images from cache can be slow too. :(
Author of Total Commander
https://www.ghisler.com
Korutz
Junior Member
Junior Member
Posts: 10
Joined: 2020-11-07, 15:44 UTC

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Korutz »

@Horst: "works on my machine" meme is soo 2005 :)

@ghisler: I don't have any virus scanner and the Windows one is turned off. Even if I did, how do you explain that TC is needlessly writing something to tcthumbs.idb when I haven't displayed any new thumbnails? It should save new thumbnails only when it stumbles upon new ones.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *petermad »

2Korutz
1. Add some images to a folder.
2. Enter folder in Thumbnail View, you should see thumbnails loading for the first time, it's fine.
3. Check tcthumbs.idb modified date - it should be current time.
4. Wait one minute.
5. Go one level above.
6. Enter folder with images again, they are reloading again, should load instantly from cache.
7. Check tcthumbs.idb modified date - it is current time even though it was cached just a minute ago!
I cannot reproduce this. The date of my tcthumbs.idb does not change, when I re-enter the folder with images - have you considered the possibility that the folder one level above the images folder might also have images and folder icons that can get cached?

Try and switch 4. and 5. in your procedure here above, so that you go 1 level up - then wait one minute before you go into the folder with images again.

I have tested with TC 10 b10 x64 under Windows 7 and 10 with a clean ini file, and with these settings:

Code: Select all

ThumbsCopyDel=1
ThumbOptions=15
ThumbPlgTypes=*.* | *.avi *.mp4 *.wmv *.mov *.mpeg *mpg *.m4v
ThumbExplTypes=*.avi *.mp4 *.wmv *.mov *.mpeg *mpg *.m4v | *.htm* *.lnk
ThumbIrfXnTypes=*.*
ThumbTxtTypes=*.txt *.ini *.mnu *.inc *.lng *.htm*
ThumbsCustomFieldsEnabled=1
ThumbsCustomField=[=tc.writedate.D-M-y]   [=tc.size.bkMG]
ThumbWidthNoCache=96
ThumbHeightNoCache=72
ThumbIconSize=32
PreloadThumbnails=2
ThumbnailPrealloc=100000
ThumbnailMemoryLimit=500
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *ghisler(Author) »

The date of my tcthumbs.idb does not change
The cache is only used for slow loading thumbnails. It doesn't make sense to use it when the thumbnails can be loaded very quickly, e.g. for small image or those containing a preview image.
Author of Total Commander
https://www.ghisler.com
Korutz
Junior Member
Junior Member
Posts: 10
Joined: 2020-11-07, 15:44 UTC

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Korutz »

petermad wrote: 2021-05-19, 00:22 UTC have you considered the possibility that the folder one level above the images folder might also have images and folder icons that can get cached?
It doesn't matter since I'm starting the whole procedure from that parent folder, so its images should be cached already as well.
This is what I do: I open TC at folder A, I go to child folder B, wait one minute, go back to parent folder A, (I can wait one minute here instead like you suggest but it makes no difference), then go back to folder B. It's reloading all thumbnails every single time. It also doesn't matter if I open folder with cached thumbnails or a different one that TC hasn't seen before - thumbnail loading speed is always similar in both cases.

I've updated to TC 10.0 and for a second I thought it's fixed, but I was testing on a folder with only few images so I haven't noticed the delay. In folders with 1000 large images (each 1 MB+) it's still lagging. Well, to be accurate lag is not the problem - as I suggested, I have a feeling cache is not used at all. It appears that it's overwriting cache db every single time regardless if it cached those files before or not.

So it obviously fails to load thumbnail cache and since it cannot load the cache to confirm its validity it's reloading thumbnails and recaching them again, every single time. I can as well turn off thumbnail cache completely and it would still load all thumbnails with same speed.

My options in windcmd.ini:

Code: Select all

ThumbsLocation=C:\tc_thumbs
ThumbsCopyDel=0
ThumbsCustomFieldsEnabled=1
ThumbWidthNoCache=120
ThumbHeightNoCache=120
ThumbOptions=6
ThumbExplTypes=*.jpg *.mp4
ThumbPlgTypes=*.* | *.png *.jpg *.gif *.bmp
ThumbIrfXnTypes=*.*
ThumbTxtTypes=*.txt *.ini
ThumbsCustomField=[=tc.size]
but it also doesn't matter, I've overwrote my options with yours and it's still reloading all thumbnails.

Perhaps you don't understand what I mean. I've recorded 2 videos, one where I'm viewing images in Thumbnail mode in Total Commander, other one where I'm doing the same in Multi Commander, so you can have a comparison and understand my expectations.
Total Commander: https://streamable.com/928j12 - notice how thumbnails are "flashing" due to being reloaded every time I reopen the "child" folder and when I scroll
Multi Commander: https://streamable.com/eyf8zj - notice how thumbnails are static, nothing is reloaded since I opened that folder before so it's reading from cache correctly, this is how it should work
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *petermad »

2Korutz
Well if what you show in https://streamable.com/928j12 is unacceptable to you, I understand your complaint.

That doesn't answer why the date of my tcthumbs.idb does not change (indicating the cache is used), when I re-enter the folder with images - and yours does change (indicating that the cache is not used, but rewritten)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Korutz
Junior Member
Junior Member
Posts: 10
Joined: 2020-11-07, 15:44 UTC

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Korutz »

I've checked on other PC, tcthumbs.idb is still updated every time, but I'm starting to think it's just how TC works :( it loads files very quickly like no other program, but all thumbnails are loaded slowly after files are displayed, one by one, even if thumbs are cached, which doesn't give the best experience. When it loads thumbnails for the first time it is noticeably slower, so looks like it won't get better than this. It just doesn't seem to keep thumbnails in memory (RAM) which can be a good thing (less memory consumption) and a bad thing (worse experience).
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *petermad »

2Korutz

I looked a little more into it - If I only use IrfanView to generate thumbnails, then it is extremely slow, but all thumbnails are cached, and when re-entering the folder the thumbnails are displayed almost instantaniously.

if I use the "Explorer method" to extract thumbnails, then all thumbnails are also cached once you have seen all thumbnails in a folder, and re-entering the folder will show the thumbnails pretty fast, and no additional caching takes place, but only when I use my very slow labtop computer

If I use the "Internal thumbnails from images" method, the thumbnails are generated faster than with the Explorer method, and none or only a few thumbnails are cached.

If I exit and re-enter the folder many times (20-30 times), and aditionally do a lot of scrolling when in the folder I can provoke more and more thumbnails to be cached, and the the display is a little faster. On my very slow labtop computer I can manage to get all thumbnails cahed this way, but on my faster Desktop computer it is almost impossible to provoke caching with the "Internal thumbnails from images" method, and it is difficult with the "Explorer" method.

So I am beginning to agree, that an option: "Always cache thumbnails" would be a nice feature, because it is oviously faster to read from cache, than using even the new faster "Internal thumbnails from images" method.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Hacker »

I just want to say that I have also experienced some unexpected behavior, e.g. thumbnails not preloading despite PreloadThumbnails=2. I didn't really investigate much since it didn't affect me that much, and now with TC 10 I have neither rechecked the behavior nor do I currently have the time to do some thorough tests, so while not adding anything useful to this thread I just want to add some weight to the claim that there are, or at least have been, some issues.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
pplupo
Member
Member
Posts: 102
Joined: 2019-12-02, 16:26 UTC
Location: Canada
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *pplupo »

Hacker wrote: 2021-06-14, 21:38 UTC I just want to say that I have also experienced some unexpected behavior, e.g. thumbnails not preloading despite PreloadThumbnails=2. I didn't really investigate much since it didn't affect me that much, and now with TC 10 I have neither rechecked the behavior nor do I currently have the time to do some thorough tests, so while not adding anything useful to this thread I just want to add some weight to the claim that there are, or at least have been, some issues.

Roman
I can endorse that as it is currently the issue that annoys me the most.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *ghisler(Author) »

I didn't notice that so far. I will check it in the debugger.
Author of Total Commander
https://www.ghisler.com
Woailizhi
Junior Member
Junior Member
Posts: 66
Joined: 2020-11-14, 08:05 UTC
Location: Poland
Contact:

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Woailizhi »

I thing TC should have a better logger to catch such issues more easily.

With best regards,
Nuno.

With eterenal love to history and China.
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Bug: TC writes thumbnail cache but never uses it

Post by *Hacker »

E.g. now I am in a dir with 98 .mp4 and .mts files in thumbnail view (Explorer method being used for .mts and .mp4 files). Cache is enabled. I Shift-Delete one file and all of the thumbnails reload. Why is the cache not used? Why do they need to reload if nothing changed in the dir except for me deleting a file?

W10 20H2, TC x64 10.00.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply