Bug 384079 - High CPU usage on Import when color management is enabled
Summary: High CPU usage on Import when color management is enabled
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-MainView (other bugs)
Version First Reported In: 5.5.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-27 16:24 UTC by Freddie Witherden
Modified: 2017-09-06 20:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Freddie Witherden 2017-08-27 16:24:28 UTC
When color management is enabled the import tool, when attempting to import NEF raw files with embedded JPEGs in the AdobeRGB color space from an SD card, becomes virtually unusable.  Specifically, a single core is pinned at 100% whenever the window has focus and there is a multi-second input lag.

Profiling with "perf" indicates that most of the wall clock time is being spent in cmsReverseToneCurveEx from liblcms2.so, which again indicates that this is related to colour management.

Once the images are imported there is no issue with CPU usage or input lag; it is only a problem in the Import dialog.  My guess is that digiKam is doing color space conversion on the fly without any kind of caching, hence the high CPU usage.
Comment 1 Maik Qualmann 2017-09-06 20:16:04 UTC
Git commit 3fe8aecccafdf0cfc41d94259dc64f43e0d3afd3 by Maik Qualmann.
Committed on 06/09/2017 at 20:14.
Pushed by mqualmann into branch 'master'.

put color managed thumbnails in the cache to reduce CPU usage drastically
FIXED-IN: 5.8.0

M  +2    -1    NEWS
M  +7    -9    utilities/importui/backend/camerathumbsctrl.cpp
M  +1    -0    utilities/importui/main/importui.cpp

https://commits.kde.org/digikam/3fe8aecccafdf0cfc41d94259dc64f43e0d3afd3