Thumbnail Cache - Time to display

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

User avatar
robc
Posts: 164
Joined: Mon Nov 14, 2005 12:53 pm

Thumbnail Cache - Time to display

Post by robc » Tue Oct 17, 2006 7:38 pm

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>

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

Re: Thumbnail Cache - Time to display

Post by Olivier_G » Tue Oct 17, 2006 11:18 pm

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!
Olivier

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Thumbnail Cache - Time to display

Post by xnview » Wed Oct 18, 2006 6:51 am

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??
Pierre.

nightflyer
Posts: 98
Joined: Tue Sep 26, 2006 7:41 am

Post by nightflyer » Wed Oct 18, 2006 7:46 am

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.
-=nightflyer=-

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

Post by Olivier_G » Wed Oct 18, 2006 1:16 pm

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.
Olivier

User avatar
robc
Posts: 164
Joined: Mon Nov 14, 2005 12:53 pm

Post by robc » Wed Oct 18, 2006 4:14 pm

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...

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Wed Oct 18, 2006 7:12 pm

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?
Pierre.

User avatar
robc
Posts: 164
Joined: Mon Nov 14, 2005 12:53 pm

Post by robc » Wed Oct 18, 2006 8:05 pm

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 :-(

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Thu Oct 19, 2006 8:11 am

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 :-(
Pierre.

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

Post by Olivier_G » Thu Oct 19, 2006 12:09 pm

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?
Olivier

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Thu Oct 19, 2006 12:28 pm

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
Pierre.

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

Post by Olivier_G » Thu Oct 19, 2006 12:53 pm

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... :?
Olivier

nightflyer
Posts: 98
Joined: Tue Sep 26, 2006 7:41 am

Post by nightflyer » Mon Oct 23, 2006 11:16 am

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?
-=nightflyer=-

nightflyer
Posts: 98
Joined: Tue Sep 26, 2006 7:41 am

Post by nightflyer » Mon Oct 30, 2006 11:48 am

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.
-=nightflyer=-

Koogle
Posts: 104
Joined: Wed Sep 20, 2006 3:23 pm

Post by Koogle » Mon Oct 30, 2006 8:16 pm

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

Post Reply