[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 108992: Simple optimizations in SignalPlotter
From: "Aleix Pol Gonzalez" <aleixpol () gmail ! com>
Date: 2013-02-18 1:39:32
Message-ID: 20130218013932.1861.43442 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108992/#review27607
-----------------------------------------------------------
I don't see loosening the variables' scope as a codebase improvement. Mostly \
otherwise.
Also I'd like to know how you measured this 5% of improvement, which either way I'm \
unsure if it's worth it considering that this patch makes everything global, now.
- Aleix Pol Gonzalez
On Feb. 17, 2013, 12:57 p.m., Raul Fernandes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108992/
> -----------------------------------------------------------
>
> (Updated Feb. 17, 2013, 12:57 p.m.)
>
>
> Review request for Plasma.
>
>
> 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: http://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
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/108992/">http://git.reviewboard.kde.org/r/108992/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't see \
loosening the variables' scope as a codebase improvement. Mostly otherwise.
Also I'd like to know how you measured this 5% of improvement, which either way \
I'm unsure if it's worth it considering that this patch makes everything \
global, now.</pre> <br />
<p>- Aleix</p>
<br />
<p>On February 17th, 2013, 12:57 p.m. UTC, Raul Fernandes wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma.</div>
<div>By Raul Fernandes.</div>
<p style="color: grey;"><i>Updated Feb. 17, 2013, 12:57 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">- 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)</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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.</pre> \
</td> </tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasma/widgets/signalplotter.cpp <span style="color: grey">(8e9e294)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/108992/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic