[Kde-pim] Re: [mobile] Memory usage in KOrganizer-mobile

Bertjan Broeksema broeksema at kde.org
Mon Nov 1 08:36:04 GMT 2010


Eduardo Fleury wrote:

<snip />

> --- The three C++ IncidenceEditors (CollectionCombo, GeneralEditor and
> MoreEditor) together add up to 3,6 mb of memory usage
> I'm not familiar with the internals of such elements, one initial idea was
> to try and avoid keeping all of them in memory at the same time, by using
> Loaders, for instance.
> One problem I had with that approach is that MoreEditor (at least) is not
> happy about being created and destroyed several times. It seems it
> register itself with the IncidenceView and BadThings happen if I delete it
> and create again. Probably a dangling pointer somewhere is leading to a
> segfault.

Yes, several editors are combined with eachother and propagate 
load/save/validate (with an incidence as argument) around. Loading and 
unloading them (especially when one of them contains modified content) will 
increase complexity quite a lot imo. Which might be good for the mobile 
case, but unneeded for the desktop (which uses practically the same code) 
and harming maintainability.

> Maybe if we could have the concept of "loaded" / "unloaded" in these guys,
> so they could reduce their own memory usage when not needed. Taking into
> account we are never using the MoreEditor at the same time as the other
> editors, we could have only one in "loaded" state at at time

This is only possible initially. I.e. as soon as the more editor contains 
modified content it cannot be unloaded anymore before the contents are 
stored.

Cheers,

Bertjan


_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list