Page 1 of 1
Clean up thumbnail cache
Posted: 12 Feb 2013 04:50
by binocular222
Hi,
My thumbnail cache is more than 1GB!
I guess that there're a lot of obsolete thumbnail as I've deleted tons of pictures but the cache didn't shrink down.
Is there any script/3rd party sotware to clean up obsolete thumbnail?
Re: Clean up thumbnail cache
Posted: 12 Feb 2013 06:46
by Slavaon
Re: Clean up thumbnail cache
Posted: 12 Feb 2013 06:53
by binocular222
Seems dangerous, it will wipe out all cache?
I just want to remove invalid ones
Re: Clean up thumbnail cache
Posted: 12 Feb 2013 07:06
by Slavaon
binocular222 wrote:
I just want to remove invalid ones
I have not found that. Also necessary for me.
Re: Clean up thumbnail cache
Posted: 12 Feb 2013 11:25
by admin
Later this year I might find time to enhance thumbnails (there are some ideas on my table). This would be the time to add "Clean up thumbnail cache".
Re: Clean up thumbnail cache
Posted: 28 Jul 2014 09:08
by Stef123
Any new developments/ work-arounds in the area of cache cleanup?
Due to massive renaming and re-organizing my cache threatens to grow bigger than the pictures it refers to.
Clearing the cache completely and scripting a new one helps to some extent. This semi-automatic approach on selected folders is better than doing it manually. It's overkill, however, to let it eat it's way through a whole drive.
An optimize/ cleanup feature to purge the cache from invalid entries - is there anything (undocumented) that I may not be aware of?
Re: Clean up thumbnail cache
Posted: 28 Jul 2014 09:17
by binocular222
Re: Clean up thumbnail cache
Posted: 28 Jul 2014 19:05
by Stef123
Well, yes, had been there - before I picked up this thread here.
But that purging script is way over my head to start with, and then it clears entire folders only, which is not really what I want.
And when I came upon this line
admin wrote:Don't waste your time on this. One day I'll add it and from here it's so much easier to do.
... I decided to do just that - and rather follow up on the overall drift of optimizing the thumbs cache.
So I guess this feature is still sitting on the backburner? Just making sure I am not waiting for something that can already be achieved.
Re: Clean up thumbnail cache
Posted: 28 Jul 2014 20:47
by klownboy
Hi Stef123, I assume you're referring to, as an example, a picture that has been deleted within a folder or moved out of a folder and the picture name will still have an entry in the thumbnail "dat2" and the thumbnail itself will obviously still be contained in the associated thumbnail "dbits" file occupying precious space though not as precious as it was 30 years ago when I was spending hundreds of dollars on a 20 or 40 MB drive (yes that's MB not GB

).
I've confirmed that on a number of occasions that when a file is moved or deleted, the entries will still be in the two thumbnail files and the thumbnail itself will also be contained within the cache file. Other than regenerating the cache for the folder, I don't think we can do much beyond what that script does. Though I wish we could. I don't know of any way myself though I'll look further...maybe one of the XY scripting heavies could extract the thumb out of the "dbits" file and the filename entry out of the "dat2" file when the file is no longer in the subject folder.
Edit: Refreshing all selected thumbnails doesn't help either - all the old entries are still there, but a complete refresh thumbnails using View | Caches | Refresh Thumbnails does appear to do a clean job of eliminating the old deleted or moved thumbs from both the "dat2" and "dbit" thumbnail file based on the test I've ran. I had one folder go from 138.4 MB to around 3.8 MB.
Maybe I could expand on my current thumbnail script by including options to both delete a folder's cache and then rebuild the cache from scratch. I'd like to do it based on the thumbnail database of folders as opposed to by "tab" as I've seen in an older script. Regeneration obviously take time but we know that in advance...time to sit back and have a coffee or beer. I know there are some independent scripts out there including mine, but it would be nice to have them integrated in one neat package.
When/if Don does at some point reinvent the wheel on thumbnails, I just hope he does nothing to slow down thumbnail display. XY thumbnail viewing along with MDBU is a huge reason for me loving this program...I take a lot of pictures.
Thanks,
Ken
Re: Clean up thumbnail cache
Posted: 29 Jul 2014 07:30
by Stef123
Thank you, Ken
Storage space per se is not my prime concern. What got me thinking are implications in terms of speed and overall performance, the clutter and (possible?) conflicts that may arise in the long run. Reduced space is welcome, too, of course. My XY folder occupies 2 GB of USB stick space, even though I already use a seperate thumbs-database for the portable setup.
klownboy wrote:...View | Caches | Refresh Thumbnails does appear to do a clean job of eliminating the old deleted or moved thumbs...
Indeed - this looks promising. For huge mammoth folders after cutting them up. I just have to remember doing it, that's the impractical part. Manual maintenance is quite a chore when you have to keep track of ToDo cleanups.
klownboy wrote:... expand on my current thumbnail script by including options to both delete a folder's cache and then rebuild the cache
Sounds very close to what I had hoped for. Processing time is irrelevant, this thing could run all night as far as I am concerned. Your own time may be more precious, though, if this feature is already cooking on Don's stove. On the receiving end - I'll be glad to stomach whatever is served to fill - or rather, empty my dish.
Thank you
Stef