A: Thumbnails Cache: bugs

Bugs and Suggestions in XnView Classic which have been resolved

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

A: Thumbnails Cache: bugs

Post by Olivier_G »

A. Compression is not applied: none/zip/JPEG-High/JPEG-Low gives the same size.
That's why I ended up with a 1GB cache instead of my previous 150MB in 1.82.4... :(

B. 'Remove' does unlist folders, but that's all: Cache size is not modified.

C. 'Optimize' does use a lot of HD&CPU, but it doesn't remove Thumbnails of images unlisted. :?:

D. 'Remove all' uses a lot of HD&CPU (and double HD space used)... just to trash everything at the end. :? (it's faster to close XnView, erase Cache, restart)

I think those bugs should be corrected before getting in 'Beta' (A, D, B are really bad).
I am not quite sure what is going on with 'Optimize' and 'Remove all', but I have the feeling that's the wrong way to do it.
Olivier
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Thumbnails Cache: bugs

Post by xnview »

Olivier_G wrote:A. Compression is not applied: none/zip/JPEG-High/JPEG-Low gives the same size.
That's why I ended up with a 1GB cache instead of my previous 150MB in 1.82.4... :(
I have big difference between compression level!
1701Kb => No compression
1398Kb => ZIP
326Kb => JPEG

Be careful, you must reset the cache!!
B. 'Remove' does unlist folders, but that's all: Cache size is not modified.
Yes, Remove doesn't optimize the database...
C. 'Optimize' does use a lot of HD&CPU, but it doesn't remove Thumbnails of images unlisted. :?:
Are you sure, Optimize remove thumbnails too
D. 'Remove all' uses a lot of HD&CPU (and double HD space used)... just to trash everything at the end. :? (it's faster to close XnView, erase Cache, restart)
Yes, because it's not a delete of file, but a clean on database...
Pierre.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Re: Thumbnails Cache: bugs

Post by Olivier_G »

xnview wrote:Be careful, you must reset the cache!!
Found the issue => it's only when I add them with 'Add folder' in Options>Cache (lossless zip is always used there).
It works correctly when directly browsing through folders.
xnview wrote:Are you sure, Optimize remove thumbnails too
Cache size is modified by a few bytes only, just like if data was removed... except Thumbnails themselves.
Olivier
User avatar
robc
Posts: 164
Joined: Mon Nov 14, 2005 12:53 pm

Post by robc »

Awww... Now that I found the feature I'd asked for has been implemented, I'm building the cache almost only by using the Add Folder button, so I'm stuck with the lossless zip algorhythm, which I did not select since it would take up too much space. I have not tested it, though, I'm just assuming Olivier_G is right.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post by Olivier_G »

The logic of Cache maintenance could probably be improved a lot:
- When you remove a folder from Cache, all data to remove is perfectly known: you don't need to go through a lengthy scan to check what is really on drive.
- Whereas when you 'Optimize' Cache, you have to go through this drive scan to check what has changed between files and DB and maintain a coherent relationship (I believe it is what is done... :?: ...Pierre? ).

=> Remove/'Remove all' should remove thumbnails and DB should immediately become smaller.
=> 'Optimize' should only be done once in a while, in order to 'synchronise' with what is really on the drive after operations made with other tools.

Edit: I created a new thread for the compression bug in 'Add folder'. This topic will be only about the Cache maintenance logic, as explained above.

Olivier
PS: in the same logic, moving/copying/renaming files/folders should also be handled at the DB level, as suggested here.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Re: A: Thumbnails Cache: bugs

Post by Olivier_G »

I confirm the following issues with Beta 1:
->B. 'Remove' does unlist folders, but that's all: Cache size is not modified.
->C. 'Optimize' does use a lot of HD&CPU, but it doesn't seem to remove Thumbnails of images unlisted: DB has almost the same size.
(I couldn't test D [the performance of 'Remove All'] as my DB of Beta 1 is too small right now...)
Olivier
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: A: Thumbnails Cache: bugs

Post by helmut »

Olivier_G wrote:I confirm the following issues with Beta 1:
->B. 'Remove' does unlist folders, but that's all: Cache size is not modified.
Confirmed in Beta 3. Only when using "Remove all" the cache size decreases to initial size (9 Kb).
Olivier_G wrote:->C. 'Optimize' does use a lot of HD&CPU, but it doesn't seem to remove Thumbnails of images unlisted: DB has almost the same size.
Confirmed in Beta 3.

To reproduce:
1. Cache a folder in XnView by browsing or using "Add folder..." in Tools > Options > Thumbnails > Cache.
2. Rename the folder (e.g. <folder>_bak
3. Use "Optimize"
--> XnView will do something but after completion the folder entry (which is no longer valid) is still listed, cache size remains unchanged.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: A: Thumbnails Cache: bugs

Post by marsh »

helmut wrote:
Olivier_G wrote:I confirm the following issues with Beta 1:
->B. 'Remove' does unlist folders, but that's all: Cache size is not modified.
Confirmed in Beta 3. Only when using "Remove all" the cache size decreases to initial size (9 Kb).
Fixed in ß-4.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: A: Thumbnails Cache: bugs

Post by marsh »

helmut wrote:
Olivier_G wrote:->C. 'Optimize' does use a lot of HD&CPU, but it doesn't seem to remove Thumbnails of images unlisted: DB has almost the same size.
Confirmed in Beta 3.

To reproduce:
1. Cache a folder in XnView by browsing or using "Add folder..." in Tools > Options > Thumbnails > Cache.
2. Rename the folder (e.g. <folder>_bak
3. Use "Optimize"
--> XnView will do something but after completion the folder entry (which is no longer valid) is still listed, cache size remains unchanged.
Fixed in ß-4.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post by Olivier_G »

Thank you Pierre for all the changes implemented.

I also confirm the following points:
- A: Compression is applied with 'Add folder'
- B: 'Remove' does now remove Thumbnails too
- D: 'Remove all' seems faster (if I remember correctly)
- C: 'Optimize' does check image coherence on a per folder basis.

However, C is still incomplete as XnView does not check coherence on a per file basis: rename/move/delete a file, use Optimize -> same number of files listed and same Cache size.
-> Back to 'Open'.
Olivier
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Olivier_G wrote:- C: 'Optimize' does check image coherence on a per folder basis.

However, C is still incomplete as XnView does not check coherence on a per file basis: rename/move/delete a file, use Optimize -> same number of files listed and same Cache size.
-> Back to 'Open'.
Sorry but i don't understand, Optimize check for all files in db. If you have 2 files in a folder, delete a file, and optimize. Cache show me 1 file!!
Pierre.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post by Olivier_G »

xnview wrote:Optimize check for all files in db. If you have 2 files in a folder, delete a file, and optimize. Cache show me 1 file!!
To reproduce the bug:
- Put 2 images in a folder, browse there (thumbnailed) and check cache => 2 [OK]
- Delete 1 file with a file manager (->1 thumbnail left in XnView).
- 'Optimize' and check cache => 2 [BUG]

Pierre: deleting an image in XnView removes its thumbnail immediately from cache (that's great), that's why you didn't reproduce the bug.
(note that moving or renaming a file does not update the cache accordingly)
Olivier
TsunamiZ

Post by TsunamiZ »

is this fixed now?
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post by Olivier_G »

Olivier_G wrote:XnView does not check coherence on a per file basis: rename/move/delete a file, use Optimize -> same number of files listed.
Fixed in Beta 6! Thank you, Pierre.

-> closed.
Olivier
Post Reply