Summary: | ICCProfile wastes a lot of memory (high memory footprint on startup) | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Andi Clemens <andi.clemens> |
Component: | ColorManagement-Backend | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | 2.5.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.1.0 | |
Sentry Crash Report: |
Description
Andi Clemens
2011-12-23 16:44:11 UTC
In bool CIETongueWidget::setProfileData(const QByteArray& profileData), we take the profile data and (again) create a new cmsPROFILE object. Taking a look at the memory usage with massif and the "taskmanager", it seems like again 25 MBs are allocated. Can't we use the already existing handle of the ICCProfile object here and pass it as a reference to this method? Andi, I think it's fine. But take a care that lcms is not re-entrant in version 1.x. In 2.x it's fixed but a lot of code need to be ported in digiKam. So, you can try as well and look if in intensive workflow using CM, all work fine. Marcel has written this CM interface, but he is certainly in vacancy. In all case i meet him in January at Genoa, i will remember to talk about it. Gilles Caulier Gilles The cmsHProfile handle is needed to use the profile with lcms - already to retrieve metadata such as description. The data is needed to compare two profiles for identity, and to embed a profile into an image. As far as I know, there is no way to retrieve the original data from the cmsHProfile handle. Originally, the intention was to open all profiles, read the decription, then close them again to free memory. Apparently, that does not work but I never investigated. Andi, Since digiKAm support LCMS2, this entry still valid ? Gilles Caulier Andi, Do you seen my previous comment ? Gilles Caulier Marcel, MAik, I cannot reproduce the problem with LCMS2. At least memory finger print is not too huge due to CM. Can you reproduce the problem ? If not so, as LCMS1 is removed in KF5 port, we will able to close this bug with 5.0.0 release. Gilles Since 5.0.0 we use only LCMS2 and this problem is not visible anymore in valgrind Gilles Caulier |