Page 1 of 1

Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 12:52 pm
by rmtk
Recently I renamed many folders in my photo album and I intended to shrink the xnview database size by deleting the cached directories with old names in "settings-database-cache maintenace". However I found it impossible as every time I closed and reopen settings the deleted items reappeared, and the size of xnview.db and thumb.db remained unchanged.

Then I tried to use the "optimize" funtion. I checked "optimize", "remove empty directories", "check for orphaned directories" and "check for orphaned files", although I don't know what are orphaned files or directories, and click OK. This time all the items in cache maintenace box were gone but the two files xnview.db and thumb.db still remained unchanged!

I think there must be some problems with the database maintenance function. I'm using 0.64 linux 64bit.

Re: Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 1:36 pm
by oops66
Hello,
Sometime the best way (faster way) is to delete/rename: xnview.db and mostly thumb.db (the bigger one) ... to rebuild it (them) ;-)

Re: Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 3:24 pm
by m.Th.
1. I strongly feel that it will be a fix in the next version. :)

2. It is a little bit dangerous to delete the xnview.db because there is the catalog (ratings, colors, categories/keywords etc.). And anyway that db is quite fast. You can safely delete if you want the thumbs.db

Re: Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 4:13 pm
by rmtk
oops66 wrote: Sometime the best way (faster way) is to delete/rename: xnview.db and mostly thumb.db (the bigger one) ... to rebuild it (them) ;-)
But it seems that xnviewmp will not automatically rebuild thumbnails of all subfolders of my album. I have to take a long time to click into them one by one to have the thumbs rebuilt. :(

Re: Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 4:21 pm
by m.Th.
rmtk wrote:
oops66 wrote: Sometime the best way (faster way) is to delete/rename: xnview.db and mostly thumb.db (the bigger one) ... to rebuild it (them) ;-)
But it seems that xnviewmp will not automatically rebuild thumbnails of all subfolders of my album. I have to take a long time to click into them one by one to have the thumbs rebuilt. :(
Well not quite.

1. XnView MP is fast enough if you set the thumbnail compression to JPEG in order to not wait too much.

However...

If you have an old/busy CPU/HDD whatever you can build all the thumbs automatically overnight:

Before you sleep ( :) ) go to Tools | Settings | Database and click on 'Rebuild Thumbnails' - it will take a while but it will do the job.

Just be sure to not have in the Thumbs pane one of the view modes without thumbs. IOW go to View | View As... and be sure to NOT select "List", "Icon" or "Details" - choose 'Thumbs + labels'

Re: Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 4:41 pm
by rmtk
m.Th. wrote: Before you sleep ( :) ) go to Tools | Settings | Database and click on 'Rebuild Thumbnails' - it will take a while but it will do the job.
No. Xnviewmp will only rebuild thumbnails of the folders already in "cached directory".
Now all my cached directories have been cleared by "optimization". If I don't click into a folder once to let it become a cached directory it's thumbnail will not be built.

Re: Cache maintenance and Database Optimization

Posted: Thu Feb 27, 2014 5:57 pm
by m.Th.
rmtk wrote:
m.Th. wrote: Before you sleep ( :) ) go to Tools | Settings | Database and click on 'Rebuild Thumbnails' - it will take a while but it will do the job.
No. Xnviewmp will only rebuild thumbnails of the folders already in "cached directory".
Now all my cached directories have been cleared by "optimization". If I don't click into a folder once to let it become a cached directory it's thumbnail will not be built.
Ok, then in the same page click on "Add Folder" and choose the root folder of your archive of images.

Re: Cache maintenance and Database Optimization

Posted: Fri Feb 28, 2014 12:40 am
by rmtk
m.Th. wrote:
rmtk wrote:
m.Th. wrote: Before you sleep ( :) ) go to Tools | Settings | Database and click on 'Rebuild Thumbnails' - it will take a while but it will do the job.
No. Xnviewmp will only rebuild thumbnails of the folders already in "cached directory".
Now all my cached directories have been cleared by "optimization". If I don't click into a folder once to let it become a cached directory it's thumbnail will not be built.
Ok, then in the same page click on "Add Folder" and choose the root folder of your archive of images.
Good! It works. Thank you.