[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 126113: make event filters static to decrease installed filters on qApp
From: "David Edmundson" <david () davidedmundson ! co ! uk>
Date: 2015-11-19 17:38:51
Message-ID: 20151119173851.14400.45892 () mimi ! kde ! org
[Download RAW message or body]
--===============2427194069595609427==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126113/#review88619
-----------------------------------------------------------
src/declarativeimports/core/units.cpp (line 41)
<https://git.reviewboard.kde.org/r/126113/#comment60747>
Why not just make this the static object...rather than having the \
SharedAppFilterStatic class which will have one instance of this?
src/declarativeimports/core/units.cpp (line 53)
<https://git.reviewboard.kde.org/r/126113/#comment60749>
You only want ApplicationFontChange.
qapplication.cpp:1671
QEvent e(QEvent::ApplicationFontChange); \
QApplication::sendEvent(QApplication::instance(), &e);
src/plasma/svg.cpp (line 47)
<https://git.reviewboard.kde.org/r/126113/#comment60748>
An SVG with colours will have a Theme object (via \
SvgPrivate::cacheAndColorsTheme())
ThemePrivate already has an (effecively shared) event filter on colours changing, \
can we use directly?
- David Edmundson
On Nov. 19, 2015, 12:08 p.m., Marco Martin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126113/
> -----------------------------------------------------------
>
> (Updated Nov. 19, 2015, 12:08 p.m.)
>
>
> Review request for KDE Frameworks and Plasma.
>
>
> Bugs: 351923
> http://bugs.kde.org/show_bug.cgi?id=351923
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> since seems there are so many event filters installed on the QApplication installed \
> that may give performance issues, try to use separate, singleton watchers for them \
> to decrease the amount of eventfilters called
>
> Diffs
> -----
>
> src/declarativeimports/core/units.h fa2256e
> src/declarativeimports/core/units.cpp 4e2adae
> src/plasma/private/svg_p.h 597465e
> src/plasma/svg.cpp bcceaf7
>
> Diff: https://git.reviewboard.kde.org/r/126113/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Marco Martin
>
>
--===============2427194069595609427==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/126113/">https://git.reviewboard.kde.org/r/126113/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/126113/diff/1/?file=417436#file417436line41" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/declarativeimports/core/units.cpp</a> <span style="font-weight: \
normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">41</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">SharedAppFilter</span><span class="o">::</span><span \
class="n">SharedAppFilter</span><span class="p">(</span><span \
class="n">QObject</span> <span class="o">*</span><span class="n">parent</span><span \
class="p">)</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Why \
not just make this the static object...rather than having the SharedAppFilterStatic \
class which will have one instance of this?</p></pre> </div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/126113/diff/1/?file=417436#file417436line53" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/declarativeimports/core/units.cpp</a> <span style="font-weight: \
normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">53</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="p">(</span><span class="n">event</span><span \
class="o">-></span><span class="n">type</span><span class="p">()</span> <span \
class="o">==</span> <span class="n">QEvent</span><span class="o">::</span><span \
class="n">ApplicationFontChange</span> <span class="o">||</span> <span \
class="n">event</span><span class="o">-></span><span class="n">type</span><span \
class="p">()</span> <span class="o">==</span> <span class="n">QEvent</span><span \
class="o">::</span><span class="n">FontChange</span><span class="p">)</span> <span \
class="p">{</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You \
only want ApplicationFontChange.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: \
inherit;">qapplication.cpp:1671</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">QEvent \
e(QEvent::ApplicationFontChange); \
QApplication::sendEvent(QApplication::instance(), &e);</p></pre> </div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/126113/diff/1/?file=417438#file417438line47" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/plasma/svg.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">47</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">SharedAppFilter</span><span class="o">::</span><span \
class="n">SharedAppFilter</span><span class="p">(</span><span \
class="n">QObject</span> <span class="o">*</span><span class="n">parent</span><span \
class="p">)</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">An \
SVG with colours will have a Theme object (via SvgPrivate::cacheAndColorsTheme())</p> \
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">ThemePrivate already has an (effecively shared) event \
filter on colours changing, can we use directly?</p></pre> </div>
</div>
<br />
<p>- David Edmundson</p>
<br />
<p>On November 19th, 2015, 12:08 p.m. UTC, Marco Martin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for KDE Frameworks and Plasma.</div>
<div>By Marco Martin.</div>
<p style="color: grey;"><i>Updated Nov. 19, 2015, 12:08 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=351923">351923</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">since seems there are so many event filters installed \
on the QApplication installed that may give performance issues, try to use separate, \
singleton watchers for them to decrease the amount of eventfilters called</p></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>src/declarativeimports/core/units.h <span style="color: \
grey">(fa2256e)</span></li>
<li>src/declarativeimports/core/units.cpp <span style="color: \
grey">(4e2adae)</span></li>
<li>src/plasma/private/svg_p.h <span style="color: grey">(597465e)</span></li>
<li>src/plasma/svg.cpp <span style="color: grey">(bcceaf7)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/126113/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============2427194069595609427==--
[Attachment #3 (text/plain)]
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic