Review Request 128849: [AppletQuickItem] Reduce string comparisons

Marco Martin notmart at gmail.com
Tue Sep 6 14:46:22 UTC 2016



> On Sept. 6, 2016, 2:32 p.m., David Edmundson wrote:
> > 1) That seems a somewhat premature optimisation? We do literally millions of string comparisons elsewhere.
> >  
> > 2) get rid of the string comparison and compare the metaObject to Applet::staticMetaObject() and you can kill the string comparison. That will be better regardless.
> > 
> > I think you can compare the classInfoOffset ?

i think it's an optimization sensible enough.
and yeah, comparing the metaobject would be better than caching the result and doing a first string comparison


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128849/#review98938
-----------------------------------------------------------


On Sept. 6, 2016, 2:19 p.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128849/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2016, 2:19 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> It's not like applet() can change, can it?
> 
> On my maching nativeInterface is called 90 times (System Tray and Notifications use it), doing a string comparison every time.
> 
> 
> Diffs
> -----
> 
>   src/scriptengines/qml/plasmoid/appletinterface.h a215ddd 
>   src/scriptengines/qml/plasmoid/appletinterface.cpp 466dbd8 
> 
> Diff: https://git.reviewboard.kde.org/r/128849/diff/
> 
> 
> Testing
> -------
> 
> System Tray and Notifications still work
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160906/b1a6f137/attachment.html>


More information about the Plasma-devel mailing list