Page 1 of 2

Thumbnail Cache - Time to display

Posted: Tue Oct 17, 2006 7:38 pm
by robc
To be honest, this has happened with all XnView versions I've used in the past months: when you have several dozen folders cached, the dialog tab takes half a minute or more to display. There's a lot of data to display and a big list to create, of course, but probably a different approach, if possible, could be used to speed it up or at least a progress bar or similar could be added.

XnView 1.90 <x>

Re: Thumbnail Cache - Time to display

Posted: Tue Oct 17, 2006 11:18 pm
by Olivier_G
robc wrote:probably a different approach, if possible, could be used to speed it up
Do you mean something like a cache of the Cache? (ie: update a single list with Folder/Images/Size) updated in the background? :o ... I support!

Re: Thumbnail Cache - Time to display

Posted: Wed Oct 18, 2006 6:51 am
by xnview
robc wrote:To be honest, this has happened with all XnView versions I've used in the past months: when you have several dozen folders cached, the dialog tab takes half a minute or more to display. There's a lot of data to display and a big list to create, of course, but probably a different approach, if possible, could be used to speed it up or at least a progress bar or similar could be added.
Even with the new cache DB??

Posted: Wed Oct 18, 2006 7:46 am
by nightflyer
Is there any need to care at all?
This is not frequently used option I guess- only for cleanup and similar work.
It is not very slow anyway.

Posted: Wed Oct 18, 2006 1:16 pm
by Olivier_G
nightflyer wrote:Is there any need to care at all? This is not frequently used option I guess- only for cleanup and similar work.
The problem I have with Cache is that it has not been completely error-free so far (and I tend to use that Cache panel regularly for manual cleaning).

Now, you are right... and we should focus instead on improving Cache itself (bugs & improvements) before next release.

Posted: Wed Oct 18, 2006 4:14 pm
by robc
Pierre, it happens with the new DB, actually I was speaking of the last alpha. I don't believe the problem lies in the db but in the list control, what usually takes up a lot of time is adding items to the list: how are you doing it? it might help to spawn a thread just for filling up the list...

Posted: Wed Oct 18, 2006 7:12 pm
by xnview
robc wrote:Pierre, it happens with the new DB, actually I was speaking of the last alpha. I don't believe the problem lies in the db but in the list control, what usually takes up a lot of time is adding items to the list: how are you doing it? it might help to spawn a thread just for filling up the list...
How many folders do you have in the list?

Posted: Wed Oct 18, 2006 8:05 pm
by robc
I have about 350 folders cached and it took about 3 minutes 40 seconds for the list to build and the tab to appear... but these are just a subset, I tend to structure deeply :-(

Posted: Thu Oct 19, 2006 8:11 am
by xnview
robc wrote:I have about 350 folders cached and it took about 3 minutes 40 seconds for the list to build and the tab to appear... but these are just a subset, I tend to structure deeply :-(
The problem is that i need to check all entries in database to compute the number of files and size used :-(

Posted: Thu Oct 19, 2006 12:09 pm
by Olivier_G
I monitored XnView when it shows the 'Cache' Options panel: 83MB was read from the 41MB cache file.
=> looks like XnView actually read everything (thumbs included) just to list things... and do it twice... :(

Questions: why 2 full passes? Why read images?

Posted: Thu Oct 19, 2006 12:28 pm
by xnview
Olivier_G wrote:I monitored XnView when it shows the 'Cache' Options panel: 83MB was read from the 41MB cache file.
=> looks like XnView actually read everything (thumbs included) just to list things... and do it twice... :(

Questions: why 2 full passes? Why read images?
No i don't read thumbnail, i make only 2 SQL commands

Posted: Thu Oct 19, 2006 12:53 pm
by Olivier_G
xnview wrote:No i don't read thumbnail, i make only 2 SQL commands
I looked more closely at the Reads with File Monitor:
- there is a total of 84000 reads of 1024 bytes on cache_thumb.db (=>83MB)
- there are 21 reads on cache_thumb.db-journal with error (file not found)
- cache_thumb.db is not read entirely, but it is actually read 20 times in cycle after journal errors
(Process Explorer confirms the 83MB I/O on disk)

There is something fishy, here... :?

Posted: Mon Oct 23, 2006 11:16 am
by nightflyer
There is definitely a problem with database performance.
When I create thumbnails for a directory from Options->Thumbnails, I get only 10-15% CPU busy on a 2GHz Pentium 4.
XnView is then totally unresponsive, there is no way to interrupt creation (click Cancel button).
Can this be a problem of not-putting thumbnail creation into transaction?

Posted: Mon Oct 30, 2006 11:48 am
by nightflyer
I have created a cache of 192x144 thumbnails, compression Lossy - High quality (JPEG).
Thumbnails are displayed about 2 for 1 second- that's bad.
However after restarting XnView, speed is back to normal.

Posted: Mon Oct 30, 2006 8:16 pm
by Koogle
my cache_thumb file is over 600mb ... it took a while to come onto the cache screen, so any sort of indication as to how much longer it would take, or some dialog that says press 'esc 'to cancel this opperation :D would be much needed