[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-06 4:35:11
Message-ID: 20110706043511.18851.69127 () 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/#review4428
-----------------------------------------------------------


That Java IDE which performs badly is IntelliJ. It has a memory usage bar i=
n the status bar which is constantly causing damage events (no idea why a u=
ser needs constant information about the memory used by the IDE...).

I found a better test for such things: the pause on error button in Firebug=
 (Firefox extension). When starting to go amok it can render the complete d=
esktop unusable. Difficulty is to trigger such a situation (don't have a re=
liable way).

- 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 />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That Java IDE which \
performs badly is IntelliJ. It has a memory usage bar in the status bar which is \
constantly causing damage events (no idea why a user needs constant information about \
the memory used by the IDE...).

I found a better test for such things: the pause on error button in Firebug (Firefox \
extension). When starting to go amok it can render the complete desktop unusable. \
Difficulty is to trigger such a situation (don&#39;t have a reliable way).</pre>  <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&#39;t overlap (and the region is added rectwise, causing \
more QRegion ops anyway) c) it allows up to 200 rects but doesn&#39;t care about the \
damage ratio before the window is &quot;just completely damaged&quot;

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 &quot;better&quot; \
until i turned off the resize handle (Bespin, but Oxygen has a comparable thing) \
which causes glxgears to damage in 12 rects. (&quot;only&quot;)

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&#39;m not optimizing towards phoronix \
results, yes Martin, i&#39;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