Images very slow to display after selected in browser

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
bcomer
Posts: 5
Joined: Fri Mar 28, 2025 7:44 pm

Images very slow to display after selected in browser

Post by bcomer »

I have a folder with about 50k images - when selecting an image there is a long delay before it is displayed.
There is also a long delay after selecting the escape key to return to the browser list.

Version 1.8.8 on a Mac Studio M2U/128GB/4TB running MAcOs 15.4.1.


Any thoughts on how to speed this up?
User avatar
xnview
Author of XnView
Posts: 46589
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Images very slow to display after selected in browser

Post by xnview »

When you open an image into an image tab, or when you select a thumbnail to display preview?
Pierre.
bcomer
Posts: 5
Joined: Fri Mar 28, 2025 7:44 pm

Re: Images very slow to display after selected in browser

Post by bcomer »

When I select an image it fills the main window.
User avatar
xnview
Author of XnView
Posts: 46589
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Images very slow to display after selected in browser

Post by xnview »

bcomer wrote: Thu May 08, 2025 1:03 am When I select an image it fills the main window.
Image tab? Please post a screenshot
Pierre.
jkm
Posts: 73
Joined: Sat May 11, 2024 12:43 am

Re: Images very slow to display after selected in browser

Post by jkm »

I can confirm that this is a problem.

XnViewMP 1.9.2 can be very slow to open images from the browser tab. By that I mean you're viewing thumbnails in the browser tab, and you double-click on a thumbnail, and the image then opens in it's own tab. This problem does not occur in v1.7.1

The slowdown is proportional to the number of images in the directory. If there are 10 files, the image opens immediately. If there are 500 files (20mp jpeg images) it takes fully 18 seconds for XnViewMP to become responsive again.

The timeline is like this:
0:double-click
0.5s: new tab opens, image is displayed, but the titlebar of the app and the tab contains <Empty>
0.5s-18s: the application is unresponsive during this time, to clicks or mouse button presses or scroll wheel actions
18s: the window title and tab title populate with the filename. the app is now fully responsive to user action.

Interestingly, once you have paid this 18 second penalty, switching between images using hotkeys is basically instant, a quarter of a second.

But if you close the tab the image is in, and then from the browser reopen the same image or a different image, you get another long delay equal to the first time.

This occurs even after completely purging the application thumbnail database. This is tested with the folders on multiple different SSDs which are in good working order.

What is it doing between the time of image load, and the time the title of the tab is populated, that could be so slow?
jkm
Posts: 73
Joined: Sat May 11, 2024 12:43 am

Re: Images very slow to display after selected in browser

Post by jkm »

A followup on this...

I downloaded a fresh copy of the portable 1.9.2, and ran the application directly from that folder, making absolutely no changes to settings.

The problem did NOT occur, and XnViewMP was generally much faster. It was many times faster at generating thumbnails in the browser.

So the problem that is being reported is triggered by one of two things:
1. A situation or corruption in the catalog database that survives a total purge of all thumbnails and file data AND an Optimize run

2. Ordinary settings changes that do not exist in the default settings of a download

I'd consider #1 a defect. #2 could be a defect, or if there is a known setting that can cause performance problems like this, the fact that there is no warning about it could be considered highly problematic.

I'll report more after further testing.
jkm
Posts: 73
Joined: Sat May 11, 2024 12:43 am

Re: Images very slow to display after selected in browser

Post by jkm »

I've found what triggers this issue.

It's the Thumbnail -> Labels setting.

Putting a reference (using to one of the custom fields) to Exiftool triggers this problem.

For example, define Custom 1 as:
WB:{ExifTool:WhiteBalance2}

This will show the value of the WhiteBalance2 tag (from MakerNotes) in the label.
Others may have used this feature and not noticed a problem, because the slowdown only becomes noticeable when there are a large number of images in the folder.

It is understandable that this would cause a slowdown when loading a directory of files in the browser, as the application is calling exiftool to populate each label.

What is not understandable is why this would be done again, for apparently every file in the directory, when a single file in the browser is double-clicked to open it in the viewer.

The contents of the Labels setting should have no impact on performance when opening a file, after the folder has already been scanned.


I understand that calling Exiftool from the Labels setting might be an edge case, but nonetheless XnViewMP is doing something here it shouldn't be doing.

Once a folder has been scanned and the labels populated, that should not be done again unless the Labels setting is changed, or a new folder is navigated to.
User avatar
xnview
Author of XnView
Posts: 46589
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Images very slow to display after selected in browser

Post by xnview »

currently when you open an image file, the file list is scanned and labels updated
:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
jkm
Posts: 73
Joined: Sat May 11, 2024 12:43 am

Re: Images very slow to display after selected in browser

Post by jkm »

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

Re: Images very slow to display after selected in browser

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.9.3. Please check and confirm the bug fix here.
Pierre.
jkm
Posts: 73
Joined: Sat May 11, 2024 12:43 am

Re: Images very slow to display after selected in browser

Post by jkm »

Yes, this is fixed. Thank you!
Post Reply