[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: DamageNotify handling
From: Martin_Gräßlin <kde () martin-graesslin ! com>
Date: 2011-07-09 13:16:01
Message-ID: 20110709131601.31200.65107 () 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/101861/#review4550
-----------------------------------------------------------
kwin/composite.cpp
<http://git.reviewboard.kde.org/r/101861/#comment3960>
nitpick :-) else goes in same line as }
- Martin
On July 5, 2011, 10:32 p.m., Thomas L=C3=BCbking wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101861/
> -----------------------------------------------------------
> =
> (Updated July 5, 2011, 10:32 p.m.)
> =
> =
> Review request for kwin.
> =
> =
> Summary
> -------
> =
> Client updates are expensiv to the compositor.
> While KWin limits the framerate (vsync or not) the client still can send =
a bazillion damage notifications between two frames w/o any gain on screen.
> =
> So far the handling is pretty expensive.
> a) KWin would handle the damage notification even though the window is st=
ill tagged completely damaged.
> b) It uses QRegion operations, though we know that the rects in the damag=
e notification won't overlap (and the region is added rectwise, causing mor=
e QRegion ops anyway)
> c) it allows up to 200 rects but doesn't care about the damage ratio befo=
re the window is "just completely damaged"
> =
> The patch changes this.
> =
> Target are high frequently updating clients, possibly using XShape.
> @Martin: do you recall that Java IDE you confirmed to perform horribly un=
der composition? Can you test it against this patch?
> Are there still known clients using XShape for text DnD?
> =
> I tried (and actually figured the problem) phoronixing KWin against Mutte=
r (wanted to know about all that FUD) and figured that Mutter did actually =
"better" until i turned off the resize handle (Bespin, but Oxygen has a com=
parable thing) which causes glxgears to damage in 12 rects. ("only")
> =
> In consequence of the patch the kwin CPU usage dropped from constant over=
all 25% to constant 15% (and the 10% being distributed to glxgears and X11)=
- ie. a 40% improvement (and higher framerates!!)
> =
> Yes, i know that glxgears is special, no i'm not optimizing towards phoro=
nix results, yes Martin, i've read the article - not that it was new to me =
;-)
> =
> =
> Diffs
> -----
> =
> kwin/composite.cpp 8c87984 =
> kwin/toplevel.h 35f1bb5 =
> =
> Diff: http://git.reviewboard.kde.org/r/101861/diff
> =
> =
> Testing
> -------
> =
> Yes, phoronixing.
> =
> =
> Thanks,
> =
> Thomas
> =
>
[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/101861/">http://git.reviewboard.kde.org/r/101861/</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="http://git.reviewboard.kde.org/r/101861/diff/1/?file=26125#file26125line764" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/composite.cpp</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">Pixmap \
Toplevel::createWindowPixmap()</pre></td>
</tr>
</tbody>
<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">751</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="p">}</span></pre></td> </tr>
<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">752</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">else</span> <span class="p">{</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">nitpick :-) \
else goes in same line as }</pre> </div>
<br />
<p>- Martin</p>
<br />
<p>On July 5th, 2011, 10:32 p.m., Thomas Lübking wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kwin.</div>
<div>By Thomas Lübking.</div>
<p style="color: grey;"><i>Updated July 5, 2011, 10:32 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;">Client updates are expensiv to the compositor. While KWin limits the \
framerate (vsync or not) the client still can send a bazillion damage notifications \
between two frames w/o any gain on screen.
So far the handling is pretty expensive.
a) KWin would handle the damage notification even though the window is still tagged \
completely damaged. b) It uses QRegion operations, though we know that the rects in \
the damage notification won't overlap (and the region is added rectwise, causing \
more QRegion ops anyway) c) it allows up to 200 rects but doesn't care about the \
damage ratio before the window is "just completely damaged"
The patch changes this.
Target are high frequently updating clients, possibly using XShape.
@Martin: do you recall that Java IDE you confirmed to perform horribly under \
composition? Can you test it against this patch? Are there still known clients using \
XShape for text DnD?
I tried (and actually figured the problem) phoronixing KWin against Mutter (wanted to \
know about all that FUD) and figured that Mutter did actually "better" \
until i turned off the resize handle (Bespin, but Oxygen has a comparable thing) \
which causes glxgears to damage in 12 rects. ("only")
In consequence of the patch the kwin CPU usage dropped from constant overall 25% to \
constant 15% (and the 10% being distributed to glxgears and X11) - ie. a 40% \
improvement (and higher framerates!!)
Yes, i know that glxgears is special, no i'm not optimizing towards phoronix \
results, yes Martin, i've read the article - not that it was new to me ;-)</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;">Yes, phoronixing.</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>kwin/composite.cpp <span style="color: grey">(8c87984)</span></li>
<li>kwin/toplevel.h <span style="color: grey">(35f1bb5)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101861/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic