Performance issues

Ideas for improvements and requests for new features in XnView Classic

Moderators: helmut, XnTriq, xnview

Post Reply
Glenn
Posts: 2
Joined: Sat Aug 09, 2008 6:57 am

Performance issues

Post by Glenn »

The directory browser is very slow, probably because it scans each directory's contents to see if it should display the + in the tree. Simply scrolling through large directories thrashes painfully, even on a modern system with a fast drive (often freezing the UI for ten seconds or more and thrashing some more when the window is scrolled). Explorer's behavior is very fast: it shows a + for every directory in the tree, and only scans to see if it should be removed if it's actually clicked.

There's a delay between selecting a directory in the browser with the keyboard (not the mouse) and it actually starting to show thumbnails, which makes skimming lots of directories slow and unresponsive.

Selecting a file to fullscreen while PNG thumbnails are still being generated seems to wait for the current thumbnail to finish, which makes the interface unresponsive: decoding a large PNG can take several seconds. (The same thing seems to happen elsewhere; for example, collapsing the parent directory in the tree view freezes the UI waiting for the current thumbnail to finish, instead of cancelling it.)

I have a lot of memory. It'd be helpful if it could use a few gigs to keep decompressed images in memory when I scroll around, and when idle, decompress nearby images to memory (up to the entire active directory or the configured memory limit) to reduce wait times; anticipatory decompression would also be able to decode multiple images at once on multi-core systems. (Not as useful but simpler: keep the last-viewed image in memory, so at least flipping back and forth between two large PNGs isn't so slow.)
User avatar
xnview
Author of XnView
Posts: 46238
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Performance issues

Post by xnview »

Glenn wrote:The directory browser is very slow, probably because it scans each directory's contents to see if it should display the + in the tree. Simply scrolling through large directories thrashes painfully, even on a modern system with a fast drive (often freezing the UI for ten seconds or more and thrashing some more when the window is scrolled). Explorer's behavior is very fast: it shows a + for every directory in the tree, and only scans to see if it should be removed if it's actually clicked.
Strange, i have no delay even with big folders. Do you have a lot of files in each folder?
There's a delay between selecting a directory in the browser with the keyboard (not the mouse) and it actually starting to show thumbnails, which makes skimming lots of directories slow and unresponsive.
Yes, there is a delay. It's normal
Selecting a file to fullscreen while PNG thumbnails are still being generated seems to wait for the current thumbnail to finish, which makes the interface unresponsive: decoding a large PNG can take several seconds. (The same thing seems to happen elsewhere; for example, collapsing the parent directory in the tree view freezes the UI waiting for the current thumbnail to finish, instead of cancelling it.)
Ok, i'll check
Pierre.
Glenn
Posts: 2
Joined: Sat Aug 09, 2008 6:57 am

Re: Performance issues

Post by Glenn »

xnview wrote:Strange, i have no delay even with big folders. Do you have a lot of files in each folder?
There are between a couple dozen and a few hundred files in each, and the parent folder has a couple hundred of these. Scanning all of these is always going to be slow (which is why Explorer doesn't do that).

(I guess Vista's Explorer does do this, but runs it in a background thread.)

I think I do always see + when viewing network drives. I just want that behavior on local drives, too.
Yes, there is a delay. It's normal
I know there's a delay--it makes the interface laggy.

Instead of having a special case delay, try having it not update while holding the key down: only update on keydown and keyup, not key repeat. That way, holding the button down won't update for every folder you pass when scrolling, but when you release the button, it'll update immediately.

One other thing: when clicking a directory, the thumbnail view doesn't update until the mouse button is released. This also feels unresponsive (and a bit strange). Some things activate on mouseup (like links), but directory selection should activate on mousedown.
ramone
Posts: 6
Joined: Sat Nov 17, 2007 6:30 am

Post by ramone »

Hi. I have a similar problem. When I expand a folder, the subfolders only get displayed at a rate of about 10 subfolders per second. A strange thing is that this only happens when browsing on my secondary drive. My main drive is almost instantaneous. By the way, Windows Explorer is fast on all my drives.

Another detail... If I exit xnview and then return to the same folder, the subfolders are displayed instantly, like it's still stored in memory. I would have to restart my pc to get the initial slow behaviour.

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

Post by xnview »

Could you send me your email by PM (i would like to send a test version)?
Pierre.
ramone
Posts: 6
Joined: Sat Nov 17, 2007 6:30 am

Post by ramone »

Hi Pierre.

Any chance this will be fixed in a future release? As we discovered when you sent me a test version, the folder expansion is slow because XnView analyzes each and every subfolder for the presence of sub-subfolders to determine whether it should display the "+" sign beside the subfolder. This can take a long time if the tree is very big.

Explorer is much quicker because it doesn't check for sub-subfolders. It puts a "+" on every subfolder, even if the subfolder has no sub-subfolders. Only after all subfolders have been listed does Explorer loop again to remove unneeded "+" signs.

Making XnView work like Explorer would make it much faster for this operation. Thanks for your consideration and thanks for such a great app!

Ramone
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Post by JohnFredC »

Yes. This change makes sense to me and would help XnView's performance in my environment.
John
Post Reply