Review Request 108992: Simple optimizations in SignalPlotter

Raul Fernandes rgfernandes at gmail.com
Mon May 5 22:54:29 UTC 2014


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

(Updated May 5, 2014, 10:54 p.m.)


Status
------

This change has been discarded.


Review request for Plasma.


Repository: kdelibs


Description
-------

- create variables and classes outside the loops
- reserve space in QList if we know already how many items will be added (avoid unnecessary reallocations)
- use const_iterator when possible
- remove a useless call (p->setPen(Qt::NoPen) - it will be set latter before be used)
- avoid multiplications (x3, x2, x1 and x0)


Diffs
-----

  plasma/widgets/signalplotter.cpp 8e9e294 

Diff: https://git.reviewboard.kde.org/r/108992/diff/


Testing
-------

I have tested with KDE 4.10 with no problems.
I have seen a improvement of about 5% in drawPlots() function, the most expensive function in painting.


Thanks,

Raul Fernandes

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


More information about the Plasma-devel mailing list