0.98.2 Using ICC profile causes 100 % CPU usage

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
Hacker
Posts: 241
Joined: Tue May 17, 2005 9:24 pm
Location: Bratislava, Slovakia
Contact:

0.98.2 Using ICC profile causes 100 % CPU usage

Post by Hacker »

Hi,
XnView MP 0.98.2 64bits, Windows 10 19042.867.
When using an ICC profile like this - https://postimg.cc/gLsVWYhD - and using the arrow keys the scroll through images, the CPU usage goes to 100%. Both the Info pane and Preview are disabled. Tested in a folder with 3000 images and in a folder with 33 JPGs, the result is the same. Tested for Thumbnails, Icons, List, Details, result is the same.
Disabling ICC fixes the CPU usage.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by xnview »

is it possible to have the icc profile, and image file used?
Pierre.
Hacker
Posts: 241
Joined: Tue May 17, 2005 9:24 pm
Location: Bratislava, Slovakia
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by Hacker »

Hi Pierre,
ICM - https://drive.google.com/file/d/129XX30 ... sp=sharing
Image files - https://drive.google.com/file/d/193oWrG ... sp=sharing (even though it happens with any image, it is not specific to these images)

Hope this helps and thank you.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by xnview »

Strange, these files have no ICC profile, so icc convert is not used. You are able to reproduce with the files sent?
Pierre.
Hacker
Posts: 241
Joined: Tue May 17, 2005 9:24 pm
Location: Bratislava, Slovakia
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by Hacker »

Hi Pierre,
Yes, as I said, I can reproduce with any random file. Take e.g. this one I chose at random - https://drive.google.com/file/d/1_nJpNG ... sp=sharing , go to Explorer, perform ten times Ctrl-C, Ctrl-V, so you have 11 identical files (1.jpg, 1 - Copy.jpg, etc.) in one folder, open that folder in XnView MP and keep holding the right arrow to scroll to the end of the list and then left arrow to scroll the beginning again, CPU jumps to 100%.

I think moving the cursor (blue rectangle) from one thumbnail to the next causes a 100% CPU usage spike and the number of files is not really relevant, only the CPU spike it is better visible when there are more files (so you can cause more consecutive CPU spikes).

Not sure if relevant, but again, it also happens with View As Icons / List / Details and the Info pane and Preview being off, so the images do not have to be rendered at all.

XnView MP uses the default sRGB profile when no ICC profile is embedded in image files. If I set "RGB Profile used when embedded profile doesn't exist" to "None" instead of sRGB, the behavior cannot be reproduced anymore. So something causes XnView MP to render the image using an ICC profile when selecting an image file.

It can also be reproduced by clicking each image in sequence by mouse, but is less convenient to reproduce than holding right arrow or left arrow.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by xnview »

Hacker wrote: Tue Mar 23, 2021 12:04 pm XnView MP uses the default sRGB profile when no ICC profile is embedded in image files. If I set "RGB Profile used when embedded profile doesn't exist" to "None" instead of sRGB, the behavior cannot be reproduced anymore. So something causes XnView MP to render the image using an ICC profile when selecting an image file.
My apologize, you're right, if you use 'sRGB profile' as default, there is a conversion when loading image...
Pierre.
Hacker
Posts: 241
Joined: Tue May 17, 2005 9:24 pm
Location: Bratislava, Slovakia
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by Hacker »

Hi Pierre,
if you use 'sRGB profile' as default, there is a conversion when loading image
That of course makes sense. What does not make sense is why conversion is happening when clicking on an image file. No thumbnail, no preview, no need to show the image, no need for any conversion.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by xnview »

Right, currently the bitmap is always loaded (Preview Off or on)
See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.98.3. Please check and confirm the bug fix here.
Pierre.
Hacker
Posts: 241
Joined: Tue May 17, 2005 9:24 pm
Location: Bratislava, Slovakia
Contact:

Re: 0.98.2 Using ICC profile causes 100 % CPU usage

Post by Hacker »

Hi Pierre,
I confirm it is much better, scrolling a dir in thumbnail view with with fully loaded thumbnails, or in a list view, or in detail view, the CPU usage is now around 10% - 12% (almost one full core though) instead of 100%. Not sure if the CPU usage during scrolling can be improved, one full core seems a bit too much for just scrolling a list. But the 100% CPU usage bug is confirmed fixed.

Thanks
Roman
Post Reply