Thumbnail Cache - Time to display

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

Moderators: XnTriq, helmut, xnview

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

Thumbnail Cache - Time to display

Post 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>
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 »

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: 43328
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Thumbnail Cache - Time to display

Post 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??
Pierre.
nightflyer
Posts: 98
Joined: Tue Sep 26, 2006 7:41 am

Post 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.
-=nightflyer=-
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post 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.
Olivier
User avatar
robc
Posts: 164
Joined: Mon Nov 14, 2005 12:53 pm

Post 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...
User avatar
xnview
Author of XnView
Posts: 43328
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post 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?
Pierre.
User avatar
robc
Posts: 164
Joined: Mon Nov 14, 2005 12:53 pm

Post 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 :-(
User avatar
xnview
Author of XnView
Posts: 43328
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post 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 :-(
Pierre.
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post 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?
Olivier
User avatar
xnview
Author of XnView
Posts: 43328
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post 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
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: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 »

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 »

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: 147
Joined: Wed Sep 20, 2006 3:23 pm

Post 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
Post Reply