[Digikam-devel] [Bug 289680] New: ICCProfile wastes a lot of memory (high memory footprint on startup)

Andi Clemens andi.clemens at googlemail.com
Fri Dec 23 16:44:11 GMT 2011


https://bugs.kde.org/show_bug.cgi?id=289680

           Summary: ICCProfile wastes a lot of memory (high memory
                    footprint on startup)
           Product: digikam
           Version: 2.5.0
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: Color Management
        AssignedTo: digikam-devel at kde.org
        ReportedBy: andi.clemens at googlemail.com


Version:           2.5.0 (using KDE 4.7.3) 
OS:                Linux

Hi,

I wanted to check why digiKam has such a high memory footprint when it just
starts (180 MB on my system), and one reason I found are the ICCProfiles.
We read the profiles from the hardddisk (in my case: /usr/share/color/icc),
which contains 25 MB of data. We load those bytes into memory, but also
create an cmsHPROFILE in IccProfile::open(), which also contains those 25 MB in
the end.
So when loading ICCSettings, digiKam already wastes 50 MB of RAM.

Sure we need to load the ICCSettings, but we do not need the data twice.
Wouldn't it be enough to just keep the cmsHPROFILE handle in ICCProfile
(d->handle), and delete the data (d->data) after successful loading of the
profile?

This will prevent us from wasting a lot of RAM.
Unfortunately, a lot of functions need to be changed to work only with the
handle (if that is even possible).

Andi

Reproducible: Always

Steps to Reproduce:
start digiKam

Actual Results:  
memory is allocated twice

Expected Results:  
should be allocated once

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list