KDE's KWin To Receive Performance Improvements

Written by Michael Larabel in KDE on 7 September 2012 at 09:02 AM EDT. 10 Comments
KDE
Next month's KDE SC 4.9.2 release will be slightly faster with the KWin compositing window manager while more performance optimizations for KWin will land in KDE SC 4.10 come late January of 2013.

Martin Gräßlin, the German maintainer of KWin, has been working on some performance work for KWin, which he's documented in a blog post.

Gräßlin has found several areas for improvement, some of which are bug-fixes that will land for the KDE 4.9.2 point release while the other changes aren't acceptable until KDE SC 4.10. Some of his key work includes:

- "Now looking at the results I saw that the translucency effect is rather expensive and that by default the effect is not doing anything unless you are moving windows. This is of course a rather unpleasant behavior to have an expensive effect doing nothing. So I looked at the implementation and found a way to better track when the effect should be active. Unless you have enabled the effect to set decorations or inactive windows to translucent the effect is now disabled by default. Just when you start moving a window the effect gets active. And even then the effect performs better."

- "I noticed that there is supposed to be an animation when a window starts to move, but personally I have never seen it. Looking closer at the code I noticed that this could have never worked. I decided that an animation added to 4.1 which has never worked can be dropped which again improves a little bit the performance. We might add a better translucency effect for 4.10 which adds the animation again, but for 4.9.x there is no user visible change by removing the animation."

- Finding multiple hacks to remove.

- The big one: "But the main optimization of this method will be available in 4.10. The output of callgrind showed that this method was causing quite some expensive dynamic casts. In fact each call caused two dynamic casts to check whether it is a specific sub class and basically the method contained two interwoven implementations for the two specific sub classes. The logical step was to make the method pure virtual and implement it in the sub classes. According to the callgrind logs after the change this improves the performance quite a lot."

This is nice that the KWin compositing window manager continues to be improved and the KDE desktop becomes faster while other desktops / window managers are moving in the wrong way.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week