Slow switching between precached images for some formats

*** Please report new bugs here! ***

Moderators: helmut, xnview, Dreamer

Post Reply
fst0p
Posts: 3
Joined: Wed Oct 01, 2025 8:30 pm

Slow switching between precached images for some formats

Post by fst0p »

Hi.

SW: XnView MP 1.9.4 (same issue for at least 1.9.3)
OS: Windows 10 22H2 x64

I'm trying to compare images by switching forward and backward using arrow keys (left and right), but issue also happens when using mouse to switch images. Here is the issue - switching for some formats is super fast, and for some it is very slow (0.5-1.0 sec by rough estimation).

In preferences I have caching for current image and prefetching of next image enabled. I obviously did not try all formats, but for those I'm interested in - it is fast for JPG, TIFF, PSD and RAW (builtin preview), and is slow for PNG. Which is quite strange, because my TIFFs and PSDs are often 16-bit/channel in ProPhotoRGB colorspace, while PNG is 8-bit/channel in sRGB - so much smaller.

And it is not clear to me why this is happening, because I can understand different times for initial load, but once current and next images are already preloaded - I don't understand from where this differences comes from. I've tried checking "Disable GIF/JIF/APNG/ANI animation", but it makes no difference. So I'm out of ideas, and it really unclear to me how image format can affect switching times for already decoded images.
I've also tried XnView MP 0.99.7 - and no issue there, everything is super fast for switching between all formats including PNG.

Sample files to reproduce: https://filebin.net/d6ubivyc6rof65ym Just unpack into empty folder, start XnView MP and navigate there, open first image in fullscreen by pressing F11. Then use left and right keys to switch between two images (right, left, right, left, ...) - observe delay for PNG files even for second and further switches. Then do the same for two provided TIFF files and see that switching is much faster.

PS: actually, after some testing I've found out that regression happened in 1.9.0
1.8.8 is the last version when switching was fast, and in 1.9.0 and newer it is slow.
User avatar
xnview
Author of XnView
Posts: 46709
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Slow switching between precached images for some formats

Post by xnview »

fst0p wrote: Wed Oct 01, 2025 9:01 pm Sample files to reproduce: https://filebin.net/d6ubivyc6rof65ym Just unpack into empty folder, start XnView MP and navigate there, open first image in fullscreen by pressing F11. Then use left and right keys to switch between two images (right, left, right, left, ...) - observe delay for PNG files even for second and further switches. Then do the same for two provided TIFF files and see that switching is much faster.
It's the same speed, please send us your xnview.ini
Pierre.
fst0p
Posts: 3
Joined: Wed Oct 01, 2025 8:30 pm

Re: Slow switching between precached images for some formats

Post by fst0p »

It's the same speed, please send us your xnview.ini
For me it is not.
Try switching between png and tiff forward and backwards multiple times.
It switches fast to tiff, and much slower to png.
Here is the ini file: https://filebin.net/jfnam620h4r32np7
But on my system it is the same with clean 1.9.4 in portable mode, and delay is absent in 1.8.8 clean portable.

I don't know if this would help or not, but I did following experiment:
I replaced xnview.exe in the 1.9.4 directory with exe from 1.8.8 - and it is switching images fast.
I restored xnview.exe from 1.9.4 - and png files are much slower to show once again.
So it doesn't seem to be related to settings in ini file.

Also, to make things clear.
Loading of images is fast: if I press F11 to open in fullscreen mode - it opens fast, both png and tiff.
But switching to any png image in fullscreen mode is much slower than to tiff or any other format.
User avatar
xnview
Author of XnView
Posts: 46709
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Slow switching between precached images for some formats

Post by xnview »

the problem happens only in fullscreen from browser, right? If you open in an image tab, no problem?
Pierre.
fst0p
Posts: 3
Joined: Wed Oct 01, 2025 8:30 pm

Re: Slow switching between precached images for some formats

Post by fst0p »

Yes! I didn't know it's possible to enter fullscreen from a tab.
So yes - the issue (slow switching to PNG images) is there if I enter fullscreen from browser.
And if i open any image in an image tab - the switching is then super fast, both in tab mode and also if i enter fullscreen from that tab by pressing F11.

As I understand it you've managed to pinpoint the root cause for this.
Can you share?
Post Reply