Review Request: Replace slow foreach constructs with faster ones

Marco Martin notmart at gmail.com
Mon Dec 13 13:49:26 CET 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6110/#review9229
-----------------------------------------------------------

Ship it!


yeah, good catch
it sucked indeed ;)

- Marco


On 2010-12-13 12:22:33, Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6110/
> -----------------------------------------------------------
> 
> (Updated 2010-12-13 12:22:33)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Doing 
> foreach (const QString &k, elements.keys()) {
>         stylesheet.replace(k, elements[k]);
> }
> Is slower and more memory intensive than needed. Chanegd to better constructs.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/plasma/datacontainer.cpp 1206096 
>   /trunk/KDE/kdelibs/plasma/private/serviceprovider.cpp 1206096 
>   /trunk/KDE/kdelibs/plasma/theme.cpp 1206096 
> 
> Diff: http://svn.reviewboard.kde.org/r/6110/diff
> 
> 
> Testing
> -------
> 
> None
> 
> 
> Thanks,
> 
> Albert
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20101213/15949c41/attachment.htm 


More information about the Plasma-devel mailing list