2

As you probably know, Windows XP has a feature of thumbnail caching. On each directory with photos you can find a hidden thumbs.db file that stores folder and file thumbnail references, that "thumbs.db" file stores the cache for Windows Explorer's thumbnail view to reduce thumbnail loading times, so that folder content doesn't need to be recalculated every time the folder is viewed and this mean it will load much faster.

This feature was reworked on newer Windows versions. Now on Windows 10 we have just a single and "temporal" thumbcache_xxx.db (numbered by size) in a single folder, which acts to store folder and file thumbnails from any directory that you view on your machine.

A rework does not mean an improvement, this concept fails for directories with a large amount of files and/or images, or with loads of folders with custom icons (specified in the hidden desktop.ini file), because its just now a single thumbcache_xxx.db file that stores all thumbnails from all the directories, and it has a size limit... that you can increase by hacking the Windows registry, but at the end you will have a very big thumbnails cache file full of junk references inside and you will end up deleting/renew the thumbnail cache for the sake of god.

In my opinion, It would be much, much simpler if Microsoft let people the personal decision to be able generate single thumbs.db files for specific folders while the newer thumbcache_xxx.db concept still does it's job with other directories that does not have a thumbs.db file, I mean both concepts could live together.


Now, my problem and question:

I have a directory with around ~2000 folders with custom icons (I mean, each folder has a hidden desktop.ini file that indicates a custom icon file for thumbnail preview), an example of what I mean:

enter image description here

so every time that I view that directory, I must face the very high load times to complete icons extraction (note are icons, not thumbnails) and caching for all folders (more than 5 minutes) while I try to scroll down with the scrollbar to let windows slowly generate the rest of icon cache. It's a pain, too slow and clunky.

Increasing the max. allocation size for IconCache_xxx.db is not a valid solution for me, because I don't want a single file that messes all the icons references from that directory with 2000 folders together with references from all other directories on my disk. I just would like to have a single thumbs.db for that directory with 2000 folders, inside that directory, so that file will preserve the cache of the icons I want to preserve and nothing more, so that folder content wouldn't need to be recalculated anymore every time the folder is viewed and this mean it will load much faster. But It seems can't do this in a proper way with Windows 10 thumbnail cache features...

Exists a solution for this?. What are my options at this point?. Which could be an acceptable approach to solve this problem I face? (not returning to use Windows XP of course).

I searched the Internet to try find any program or shell extension or just some thing that could hack/bypass IconCache_xxx.db features in order to let me generate thumbs.db files for specific directories, but it seems does not exists anything similar like that.

Is there any magical registry value that I can set to be able generate thumbs.db files for each directory like in Windows XP era?. Any alternative then?.


UPDATE:

I found the open-source program WinThumbsPreloader, it is awesome for people that has the same problem I have, but for thumbnails.

The problem I have is with the icon cache, not the thumbnail cache. So, WinThumbsPreloader can't help me because it does not cache folder or file icons, it only caches folder/file thumbnails.

I need to be able to do the same thing WinThumbsPreloader does, but for folder icons instead of file thumbnails. select a directory arbitrarily and preload its folder icons in the Windows icon cache.

  • Please give an example of one desktop.ini of yours. Are the referred images thumbnail-size or much larger? Are they .ico files? – harrymc May 28 at 19:09
  • @harrymc thanks for comment. All the images referenced in my desktop.ini files (with no exception) are multi-layered .ico files with these sizes inside: 256x256, 128x128, 96x96, 48x48, 32x32, 24x24 and 16x16. Here is a folder sample: mediafire.com/file/pcomizv46ewrtf6/sample.zip/file - also if it can be of interest I opened a related programming question about this problem: stackoverflow.com/questions/61987130/… – ElektroStudios May 28 at 19:28
  • Is it possible for you to browse the thumbnails using something else, e.g. IrfanView Thumbnails tool which bypasses the Windows cache completely and always reads images without caching? – miroxlav May 28 at 21:00
  • @miroxlav not really, I depend on Explorer.exe. thanks for comment – ElektroStudios May 29 at 7:07
  • Your icons are enormous at 258 KB each, which might be why you are exploding the cache. For 2000 of them you would need a cache of half a GB, which I saw somewhere is more than Windows allows. Perhaps reducing the size of your icons to at least half, keeping only one or two sizes, will help here. – harrymc May 29 at 8:23
1

The thumb-cache files seem to have an upper limit on their total size. On the other hand, your icons are very large at 258 KB each. With ~2000 icons, your cache could be of about half a gigabyte.

When the maximal size is reached, Windows will delete icons, starting with the oldest. This might explain why you are losing icons from the cache and needing to regenerate them again.

Reducing the sizes of the icons might be one solution to the problem.

This same problem was also discussed by users in the post After fall update, Windows 10 puts a maximum size on thumbnail cache and deletes older thumbnails before new ones can be generated.

According to the experiments by the poster of the above link, the thumbcache_96.db file tops off at 349 MB.

Another user found inadvertently a workaround for the problem:

holding Ctrl on the keyboard and rolling the mouse wheel one tick up.

This apparently has forced Windows Explorer to render the thumbnails at a higher resolution, which means that they are no longer suitable to be stored in the _96.db file, but instead, in the _256.db file.

I set this view as default for all pictures folders by clicking the File menu in the Explorer window and selecting "Change folder and search options" to open the "Folder Options" window, then selecting tab View and clicking on Apply to folders under Folder Views.

I believe the file thumbcache_256.db must have a hard limit to its size like its counterpart, but it seems to be considerably higher, as my file is currently sitting at 1,334,272KB and still growing.

Displaying larger icons might solve the problem for you, but flush your icons first using Disk Cleanup. If this option is not available for cleanup, see the last entry in the above linked post.

| improve this answer | |
  • Hi.First of all thanks for answer but I must clarify some important things: 1. I never said that the problem is: "losing icons from the cache and needing to regenerate them again". The problem is that I just would like to preload a set of folder icons in the windows icon (not thumbnail) cache,regardless of whether if I have those icons already cached or I have zero cached icons.I just need to do the same thing "WinThumbsPreloader" program does,but for icons instead of thumbnails.For this reason,and with all my respects to you,the file size of my icons has nothing to do with the problem I have. – ElektroStudios Jun 1 at 16:38
  • 2.I have a size limit of 4096 MB (4 GB) for the cache files,this size can be set via registry value (note the limit can be set to a bigger size,like 8 GB,but that will cause performance issues).I ensured my cache files (at least "IconCache_256.db",which is the one that Windows uses more to store folder icons) can occupy more than 1 GB file size,then it does not have that "hard limit" of the conjectures of those experiments,and does not delete old cached images unless I manually rebuild/delete the cache (I also set the 'automatic maintenance' via registry to avoid deleting old cached images). – ElektroStudios Jun 1 at 16:40
  • 3. Probably the next thing to clarify was a mistake from my side when I was redacting the question, I'm sorry to cause confusion, but I always tried to refer to the icon cache, not the thumbnail cache. At the start (when I redacted the question) I had my doubts because I was not sure whether Windows was extracting/caching icons or thumbnails for folders, but now is clear, the custom folder icons are stored in "IconCache_.db" files and NOT in "ThumbCache_.db" files, then my problem and question is about the icon cache system only. I upvoted your answer, thanks for trying to help! – ElektroStudios Jun 1 at 16:43
  • Correction noted. If I understand right, you increased in the registry the Max Cached Icons to 4096, which should have fixed the problem. How big is IconCache_256.db after the icons are fully displayed? – harrymc Jun 1 at 17:20
  • As I mentioned in the main topic, increasing the limit via that registry value is not a solution for my real problem, but yes, it solves the initial limit. Answering to your question: with a empty icon cache, and for a sample of 1.800 folders with custom icons, my IconCache_256.db increases to ~180 MB. IconCache_16.db to ~4 MB and IconCache_32.db to ~10 MB, while _96.db, _768.db, _1280.db, _1920.db, _2560.db, _custom_stream.db, _exif.db, _sr.db, _wide.db and _wide_alternate.db are not modified (file size remains 24 bytes for all of them) – ElektroStudios Jun 1 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.