MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by winnylinny »

I can 100% confirm on two different PCs that version 0.99.0 has a performance regression when viewing high-resolution images.

* Both computers run Manjaro (KDE desktop). One is Intel Iris Xe graphics, the other is Nvidia.

* Both computers handle high-resolution images smoothly, wihouth any issues, on version 0.98.4.

* On version 0.99.0, viewing a high-resolution image slows down the entire interface, whether panning, zooming, navigating, and even when using the menubar.

* Reverting back to 0.98.4, the issue went away.

* This does not happen for JPG, PNG, or BMP. Only with WebP. (Not true, see my updates below!)
Last edited by winnylinny on Tue Sep 21, 2021 2:07 pm, edited 8 times in total.
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (WebP performance GREATLY impacted)

Post by winnylinny »

UPDATE: Upon further investigation, this regression might deal with how XnViewMP 0.99.0 deals with high-resolution images.

It seems that high-resolution WebP makes this bug more obvious, but even with high-resolution JPEG images, version 0.98.4 performs much better than 0.99.0. It's not as obvious with high-resolution JPG, but VERY obvious with high-resolution WebP.

Therefore the underlying bug might have something related to overall performance in the engine, rather than WebP itself. It's just that WebP, requiring more system CPU resources makes it more noticeable than JPG, when comparing 0.98.4 vs 0.99.0.
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (WebP performance GREATLY impacted)

Post by winnylinny »

UPDATE 2: Monitoring my CPU usage, I see that actively zooming (CTRL + mousewheel) SLAMS a CPU thread to 100%. I also notice the CPU remains at 50% or higher if I'm simply using the menubar (File, Edit, View) without even clicking on anything... just navigating the menus with my mouse cursor.

However, the CPU settles to nearly 0% if I leave the image open and don't touch it (nor touch XnViewMP interface at all.)

If I click and drag the XnViewMP window around, nothing happens to the CPU, it stays near 0%.

So it appears the following cause a nasty CPU usage: zooming in and out, using the menubar menus, or navigating through images in a folder (mousewheel / left and right arrow keys)

This is important: When I monitor my CPU doing the exact same things above, but this time using 0.98.4, it stays very low, under 5%. Barely anything at all.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MAJOR regression in 0.99.0 (WebP performance GREATLY impacted)

Post by xnview »

could you post screenshots of settings>view?
Pierre.
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by winnylinny »

Here are the screenshots.


0990-view-info.png

0990-view-misc.png

0990-view.png


FYI: Changing "High zoom quality" to Never doesn't make a difference. Same regression bug, regardless.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by xnview »

which image pixel size for your high-resolution images ?
Pierre.
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by winnylinny »

Here is a sample WebP image, 5472 x 3648 resolution.

Link expires in 7 days: https://www.filemail.com/d/pquezkuenckjbzr

Open it in XnViewMP 0.99.0, then hold CTRL while using the mousewheel to continually zoom in and out.

Now repeat the same steps, but this time use version 0.98.4.

---

This same exact WebP image (5472 x 3648) works fine with XnViewMP 0.98.4. Even the JPEG version of the same image. However, both the WebP and JPEG versions of the same image exploit the regression performance bug in version 0.99.0. (WebP is more noticeable than JPEG, but the same performance regression occurs on both.)
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by winnylinny »

ANOTHER UPDATE:

I can reproduce this on Linux and Windows, Intel GPU and Nvidia GPU.

---

FURTHER INVESTIGATION:

The sluggishness eventually "goes away" for the Nvidia GPU computer, both Linux and Windows. Which means initially opening the image and trying to hold CTRL + mousewheel to zoom in an out immediately acts poor and sluggish, but after several seconds it "normalizes" and is smooth and fast again. (Perhaps Nvidia is better than Intel at caching it into buffer or something?)

The above is also true for navigating the menubar and navigating through high-res images in the same folder.

Even if it eventually normalizes, it's still a nasty performance regression compared to version 0.98.4.

Was there a change in the code for how images are displayed and/or changes in the code regarding the core engine for the viewer?
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by winnylinny »

ANOTHER UPDATE:

I discovered an interesting result for the Nvidia computer, both under Linux and Windows.

If I open up the image (such as the one I uploaded in an earlier post), and I leave it for 10 seconds, then it works normally.

Doing nothing else differently, simply not doing anything for 10 seconds after opening the image... and once I try to zoom in and out, it's fine! :o

1. Open image
2. Wait 10 seconds (don't do anything)
3. Now everything is fine
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.99.1. Please check and confirm the bug fix here.
Pierre.
User avatar
winnylinny
Posts: 153
Joined: Fri Apr 17, 2020 5:35 pm

Re: MAJOR regression in 0.99.0 (high-resolution image performance GREATLY impacted)

Post by winnylinny »

Confirmed that this fixes the issue!

Linux, KDE, Intel: Fixed!
Linux, KDE, Nvidia: Fixed!
Windows 10, Nvidia: Fixed!

Thank you Pierre! :D
Post Reply