[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 117903: Make notifications plasmoid reuse only 3 Dialogs instead of creating new
From: "Marco Martin" <notmart () gmail ! com>
Date: 2014-05-02 12:07:13
Message-ID: 20140502120713.1510.67653 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117903/#review57118
-----------------------------------------------------------
Ship it!
to me looks fine.
have to trust you you tested it thoroughly tough :)
- Marco Martin
On April 30, 2014, 2:27 p.m., Martin Klapetek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117903/
> -----------------------------------------------------------
>
> (Updated April 30, 2014, 2:27 p.m.)
>
>
> Review request for Plasma.
>
>
> Repository: plasma-workspace
>
>
> Description
> -------
>
> Before, the notifications would create new Dialog for each incoming notification. \
> Now it reuses only 3 Dialogs to save resources.
> The notification popup is a QML component; I decided to handle all this in the cpp \
> plugin as JS Array is quite crap compared to QList and I had quite some crashes in \
> QV4 on slightly heavier Array processing. But as the QML component needs to talk to \
> the dataengine (like when you close the notification or exectue an action) and uses \
> some methods from the rest of the plasmoid, I can't just instantiate it from the \
> cpp side. So I create the component in QML, pass it to CPP, set the ownership to \
> CPP so it's not deleted ever and then handle it all there.
>
> Diffs
> -----
>
> applets/notifications/package/contents/ui/NotificationPopup.qml 9265352
> applets/notifications/package/contents/ui/Notifications.qml 64d80a7
> applets/notifications/plugin/notificationshelper.h 1e1f6c2
> applets/notifications/plugin/notificationshelper.cpp 1edfbad
>
> Diff: https://git.reviewboard.kde.org/r/117903/diff/
>
>
> Testing
> -------
>
> Plasma no more leaks memory with every notification (the root memleak, coming from \
> Dialog, is quite possibly still present, but the notifications don't expose it \
> anymore). Notifications work as before, even better.
> For testing purposes, you can try running
>
> for i in {1..10}; do notify-send asasd$i -i kde; done
>
>
> Thanks,
>
> Martin Klapetek
>
>
[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="https://git.reviewboard.kde.org/r/117903/">https://git.reviewboard.kde.org/r/117903/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">to me looks fine. have \
to trust you you tested it thoroughly tough :)</pre> <br />
<p>- Marco Martin</p>
<br />
<p>On April 30th, 2014, 2:27 p.m. UTC, Martin Klapetek wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://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 Martin Klapetek.</div>
<p style="color: grey;"><i>Updated April 30, 2014, 2:27 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</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;">Before, the notifications would create new Dialog for each incoming \
notification. Now it reuses only 3 Dialogs to save resources.
The notification popup is a QML component; I decided to handle all this in the cpp \
plugin as JS Array is quite crap compared to QList and I had quite some crashes in \
QV4 on slightly heavier Array processing. But as the QML component needs to talk to \
the dataengine (like when you close the notification or exectue an action) and uses \
some methods from the rest of the plasmoid, I can't just instantiate it from the \
cpp side. So I create the component in QML, pass it to CPP, set the ownership to CPP \
so it's not deleted ever and then handle it all there.</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;">Plasma no more leaks memory with every notification (the root memleak, \
coming from Dialog, is quite possibly still present, but the notifications don't \
expose it anymore). Notifications work as before, even better.
For testing purposes, you can try running
for i in {1..10}; do notify-send asasd$i -i kde; done</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>applets/notifications/package/contents/ui/NotificationPopup.qml <span \
style="color: grey">(9265352)</span></li>
<li>applets/notifications/package/contents/ui/Notifications.qml <span style="color: \
grey">(64d80a7)</span></li>
<li>applets/notifications/plugin/notificationshelper.h <span style="color: \
grey">(1e1f6c2)</span></li>
<li>applets/notifications/plugin/notificationshelper.cpp <span style="color: \
grey">(1edfbad)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117903/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