Review Request: Stop DataContainer from discarding multiple values for a single key.

Aaron J. Seigo aseigo at kde.org
Wed Jun 9 03:03:00 CEST 2010


On June 8, 2010, Beat Wolf wrote:
> > On 2010-06-08 19:20:44, Marco Martin wrote:
> > > this actually causes a memory escalation
> > > 
> > > not actually a "leak" but in systemmonitor for instance each time a new
> > > value arrives, will have a different one so the values will continue
> > > to pile up more and more
> 
> i have here a patch that solves the problem. but i'm not sure if it's the
> right way to do it. but it stopped the systemloadviewer leak.
> http://pastebin.com/L9ByrKVT

i think it is more complex than needed, tbh, and it adds CPU overhead for the 
common case.

with my proper thinking cap on, here's what needs to be done:

* revert the original commit completely; one key per hash

* make the calendar dataengine work properly: put a QStringList in for the 
duplicate dates. so instead of:

        holidays.insertMulti("2010-06-01", "A national public holiday");
        holidays.insertMulti("2010-06-01", "A minor religious holiday");

it would be:

	QStringList entries;
	entries << "A national public holiday" << "A minor religious holiday";
	holidays.insert("2010-06-01", entries);

this follows the actual idea of the DataEngines properly.

who wants to do the honors? John? :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100608/271239ec/attachment.sig 


More information about the Plasma-devel mailing list