[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: Split out Compositor into an own class
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2012-08-27 20:56:12
Message-ID: 20120827205612.6086.78878 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Aug. 27, 2012, 1:41 p.m., Thomas Lübking wrote:
> > kwin/workspace.cpp, line 564
> > <http://git.reviewboard.kde.org/r/106060/diff/3/?file=80328#file80328line564>
> > 
> > seriously?
> > this used to be a call to an inline function, cheking whether the timer is active \
> > and otherwise do nothing most of the time. 
> > Now it's a (rather expensive) string (normalized) based symbol lookup for every \
> > damage event, probably the hottest loop in kwin...
> 
> Christoph Feck wrote:
> When connecting two objects, the meta object system needs symbol lookup to find the \
> sender/receiver IDs. 
> When actually signalling an object, the overhead is "only" about that of a virtual \
> function call; no lookup required. 
> It's really mysterious that common misbeliefs used in the old "GTK vs. Qt" days \
> still pop up, even from rather experienced Qt developers. Funny :) 
> Martin Gräßlin wrote:
> I'll run it through callgrind the next few days to see whether there are any \
> regressions. 
> Thomas Lübking wrote:
> FWIWI 
> the overhead is ~10% for each hop (so signal/signal/slot has a 20% overhead) - \
> simple virtuals (pointless adding of the keyword) ~3% 
> It's good to know that s/s are not stupid (never tested that. read there's overhead \
> -> avoid usage in hot loops) but they're not for free either. 
> I'll share testcode on interest.

given that some clients bombard us with damage events it seems valid to change it \
again - bye, bye the idea of better separating the window manager from the Compositor \
:-)


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106060/#review18090
-----------------------------------------------------------


On Aug. 23, 2012, 12:50 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106060/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2012, 12:50 p.m.)
> 
> 
> Review request for kwin and Arthur Arlt.
> 
> 
> Description
> -------
> 
> Based on review request 102420 which got rebased on current master. In addition \
>                 some further work has been added by me:
> * renamed a few methods and variables, by dropping compositing prefixes
> * made the Scene a private member of the Compositor class. Outside the compositor \
>                 it has only been used to determine whether Compositing is active.
> * moved reinitCompositing and restartKWin from Workspace to Compositor
> 
> Further planned work once this is in master:
> * better way to determine whether Compositing is active (currently no longer an \
>                 inline method)
> * export /Compositor on D-Bus interface
> * deprecate the Compositing related D-Bus methods in the Workspace interface
> * maybe make EffectsHandlerImpl a private member of Compositor
> 
> 
> Diffs
> -----
> 
> kwin/activation.cpp 7c07d5e 
> kwin/bridge.cpp 32d4c84 
> kwin/client.h f31707b 
> kwin/client.cpp c541595 
> kwin/composite.h PRE-CREATION 
> kwin/composite.cpp c65716b 
> kwin/effects.h 014c4cf 
> kwin/effects.cpp 9986691 
> kwin/events.cpp 6856922 
> kwin/geometry.cpp edca219 
> kwin/layers.cpp 4521554 
> kwin/paintredirector.cpp 7ed4d6f 
> kwin/scene.h 3891198 
> kwin/scene.cpp 5782510 
> kwin/scene_opengl.h de33ce4 
> kwin/scene_opengl.cpp cbcc0ca 
> kwin/toplevel.h aba9321 
> kwin/toplevel.cpp 9417813 
> kwin/utils.h 9eb3589 
> kwin/workspace.h 16630f7 
> kwin/workspace.cpp cf3f308 
> 
> Diff: http://git.reviewboard.kde.org/r/106060/diff/
> 
> 
> Testing
> -------
> 
> currently running and have not noticed any problems except KWin crashes on \
> Shutdown. Will investigate once I see the proper highlighted diff in the interface 
> 
> Thanks,
> 
> Martin Gräßlin
> 
> 


[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/106060/">http://git.reviewboard.kde.org/r/106060/</a>
  </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On August 27th, 2012, 1:41 p.m., <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<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/106060/diff/3/?file=80328#file80328line564" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/workspace.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 3)

    </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; \
">Client* Workspace::createClient(Window w, bool is_mapped)</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">548</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">connect</span><span class="p">(</span><span class="n">c</span><span \
class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span \
class="n">needsRepaint</span><span class="p">()),</span> <span \
class="n">m_compositor</span><span class="p">,</span> <span \
class="n">SLOT</span><span class="p">(</span><span \
class="n">scheduleRepaint</span><span class="p">()));</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">seriously? this used to \
be a call to an inline function, cheking whether the timer is active and otherwise do \
nothing most of the time.

Now it&#39;s a (rather expensive) string (normalized) based symbol lookup for every \
damage event, probably the hottest loop in kwin...</pre>  </blockquote>



 <p>On August 27th, 2012, 2:08 p.m., <b>Christoph Feck</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When connecting two \
objects, the meta object system needs symbol lookup to find the sender/receiver IDs.

When actually signalling an object, the overhead is &quot;only&quot; about that of a \
virtual function call; no lookup required.

It&#39;s really mysterious that common misbeliefs used in the old &quot;GTK vs. \
Qt&quot; days still pop up, even from rather experienced Qt developers. Funny \
:)</pre>  </blockquote>





 <p>On August 27th, 2012, 7:14 p.m., <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <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&#39;ll run it through \
callgrind the next few days to see whether there are any regressions.</pre>  \
</blockquote>





 <p>On August 27th, 2012, 7:29 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">FWIWI  the overhead is \
~10% for each hop (so signal/signal/slot has a 20% overhead) - simple virtuals \
(pointless adding of the keyword) ~3%

It&#39;s good to know that s/s are not stupid (never tested that. read there&#39;s \
overhead -&gt; avoid usage in hot loops) but they&#39;re not for free either.

I&#39;ll share testcode on interest.</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">given that \
some clients bombard us with damage events it seems valid to change it again - bye, \
bye the idea of better separating the window manager from the Compositor :-)</pre> \
<br />




<p>- Martin</p>


<br />
<p>On August 23rd, 2012, 12:50 p.m., Martin Gräßlin 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 and Arthur Arlt.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated Aug. 23, 2012, 12:50 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;">Based on review request 102420 which got rebased on current master. In \
                addition some further work has been added by me:
* renamed a few methods and variables, by dropping compositing prefixes
* made the Scene a private member of the Compositor class. Outside the compositor it \
                has only been used to determine whether Compositing is active.
* moved reinitCompositing and restartKWin from Workspace to Compositor

Further planned work once this is in master:
* better way to determine whether Compositing is active (currently no longer an \
                inline method)
* export /Compositor on D-Bus interface
* deprecate the Compositing related D-Bus methods in the Workspace interface
* maybe make EffectsHandlerImpl a private member of Compositor</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;">currently running and have not noticed any problems except KWin crashes \
on Shutdown. Will investigate once I see the proper highlighted diff in the \
interface</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/activation.cpp <span style="color: grey">(7c07d5e)</span></li>

 <li>kwin/bridge.cpp <span style="color: grey">(32d4c84)</span></li>

 <li>kwin/client.h <span style="color: grey">(f31707b)</span></li>

 <li>kwin/client.cpp <span style="color: grey">(c541595)</span></li>

 <li>kwin/composite.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>kwin/composite.cpp <span style="color: grey">(c65716b)</span></li>

 <li>kwin/effects.h <span style="color: grey">(014c4cf)</span></li>

 <li>kwin/effects.cpp <span style="color: grey">(9986691)</span></li>

 <li>kwin/events.cpp <span style="color: grey">(6856922)</span></li>

 <li>kwin/geometry.cpp <span style="color: grey">(edca219)</span></li>

 <li>kwin/layers.cpp <span style="color: grey">(4521554)</span></li>

 <li>kwin/paintredirector.cpp <span style="color: grey">(7ed4d6f)</span></li>

 <li>kwin/scene.h <span style="color: grey">(3891198)</span></li>

 <li>kwin/scene.cpp <span style="color: grey">(5782510)</span></li>

 <li>kwin/scene_opengl.h <span style="color: grey">(de33ce4)</span></li>

 <li>kwin/scene_opengl.cpp <span style="color: grey">(cbcc0ca)</span></li>

 <li>kwin/toplevel.h <span style="color: grey">(aba9321)</span></li>

 <li>kwin/toplevel.cpp <span style="color: grey">(9417813)</span></li>

 <li>kwin/utils.h <span style="color: grey">(9eb3589)</span></li>

 <li>kwin/workspace.h <span style="color: grey">(16630f7)</span></li>

 <li>kwin/workspace.cpp <span style="color: grey">(cf3f308)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/106060/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