There needs to be a way to limit the size of the thumbnail cache automatically.
I suggest one of the following user options:
1) Ability to define the maximum size of the thumbnails folder.
2) Ability to define the maximum number of thumbnails to cache.
Once the maximum is reached the least recently accessed items should be replaced by the new ones.
Ability to limit the thumbnail cache.
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
The thumbs cache has 2 files for each folder with thumbnails. One file contains the the number of images, their names and dimensions and some other info; the other contains the raw image data.
Nowhere else is the total number of thumbs stored. So I would have to caculate it each time the cache is written. Not good.
Why exactly are you suggesting to add a limit?
Nowhere else is the total number of thumbs stored. So I would have to caculate it each time the cache is written. Not good.
Why exactly are you suggesting to add a limit?
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
It just seems very sloppy for it to eat up more and more space over time.
When run portably there's good reason to keep programs in check regarding their disk space.
Right now my Thumbnail cache is nearing 100 MB, and that's with a copy that isn't doing a lot of managing of images. My home copy is probably taking up a lot more space.
As an alternative, perhaps the following would work:
Create a new function/scripting command/menu item:
"Clean Thumbnail Cache" which would calculate the folder size, and if greater than a user setting, remove the oldest/LRU items until it's under the max size.
Then have two user options:
"Maximum Thumbnail Cache Size"
"Clean Thumbnail Cache on Exit" - which would execute the function when closing XY.
When run portably there's good reason to keep programs in check regarding their disk space.
Right now my Thumbnail cache is nearing 100 MB, and that's with a copy that isn't doing a lot of managing of images. My home copy is probably taking up a lot more space.
As an alternative, perhaps the following would work:
Create a new function/scripting command/menu item:
"Clean Thumbnail Cache" which would calculate the folder size, and if greater than a user setting, remove the oldest/LRU items until it's under the max size.
Then have two user options:
"Maximum Thumbnail Cache Size"
"Clean Thumbnail Cache on Exit" - which would execute the function when closing XY.
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
I somehow dislike this kind of smartness. Why don't you just go there and delete the LRU items? Takes 10 seconds maybe...TheQwerty wrote:It just seems very sloppy for it to eat up more and more space over time.
When run portably there's good reason to keep programs in check regarding their disk space.
Right now my Thumbnail cache is nearing 100 MB, and that's with a copy that isn't doing a lot of managing of images. My home copy is probably taking up a lot more space.
As an alternative, perhaps the following would work:
Create a new function/scripting command/menu item:
"Clean Thumbnail Cache" which would calculate the folder size, and if greater than a user setting, remove the oldest/LRU items until it's under the max size.
Then have two user options:
"Maximum Thumbnail Cache Size"
"Clean Thumbnail Cache on Exit" - which would execute the function when closing XY.
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Because I shouldn't have to babysit XY?admin wrote:I somehow dislike this kind of smartness. Why don't you just go there and delete the LRU items? Takes 10 seconds maybe...
This kind of smartness is merely XY being responsible and recognizing the fact that while there may be a lot of resources available it's not XY's right to (attempt to) consume them all.
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Okay. I could issue a warning (on closing the app?) when the cache folder is larger then a certain size. Would that help?TheQwerty wrote:Because I shouldn't have to babysit XY?admin wrote:I somehow dislike this kind of smartness. Why don't you just go there and delete the LRU items? Takes 10 seconds maybe...
This kind of smartness is merely XY being responsible and recognizing the fact that while there may be a lot of resources available it's not XY's right to (attempt to) consume them all.
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Eh...admin wrote:Okay. I could issue a warning (on closing the app?) when the cache folder is larger then a certain size. Would that help?
For now, leave it as is, but make a note at the bottom of your list to consider a better caching system (that would allow XY to be more responsible), and hopefully some other users can comment on this. (And really you might want to make a note with the search result caching item(s) as well.)
It's not that this is an actual issue at the moment, but I feel the current method comes off as sloppy and reflects poorly on you for just assuming it's okay for the cache to grow without limits. Especially when using XY portably is such a beneficial and marketable feature.
-
admin
- Site Admin
- Posts: 66312
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Okay, as it is currently, you should not use caching when you don't want to leave traces on the host computer.TheQwerty wrote:Eh...admin wrote:Okay. I could issue a warning (on closing the app?) when the cache folder is larger then a certain size. Would that help?
For now, leave it as is, but make a note at the bottom of your list to consider a better caching system (that would allow XY to be more responsible), and hopefully some other users can comment on this. (And really you might want to make a note with the search result caching item(s) as well.)
It's not that this is an actual issue at the moment, but I feel the current method comes off as sloppy and reflects poorly on you for just assuming it's okay for the cache to grow without limits. Especially when using XY portably is such a beneficial and marketable feature.
As a first little improvement I just made the thumbs cache folder definition fully portable. This allows you to keep the traces relative to XYplorer.exe (drive / folder).
The rest: at the bottom of my list.
FAQ | XY News RSS | XY X
XYplorer Beta Club