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

This review has been submitted with commit bb6d4873259691b189a8b706f9dfc2e858f54609 by Martin Gräßlin to branch master.

- Commit


On August 27th, 2011, 9:34 a.m., Martin Gräßlin wrote:

Review request for kwin and Alex Fiestas.
By Martin Gräßlin.

Updated Aug. 27, 2011, 9:34 a.m.

Description

I did a callgrind analysis of KWin and noticed (as expected) that the effect chain is the most often called code in KWin and that it is not very performant due to the operator[] used all the time.

This change allows effects to declare themselve as active, which means they will be included in the effect chain. If an effect is currently not active, it will not be called. The result is that only a very small number of effects is used in the current frame eliminating completely the hot path inside kwin. After that change Toplevel::windowType and Scene::Window::performPaint are the most expensive methods. PerformePaint for example was not even in the top ten before!

PresentWindows, DesktopGrid and Slideback are not adjusted yet, because WindowMotionmanager::areWindowsMoving() is not const. This will be changed as Slideback is now in the hot path

The analysis was motivated by complaints from afiestas about too bad framerate/performance, bringing me thinking about what during rendering a frame might be slow.

Testing

Effects which I use are still working. Not all effects tested.

Diffs

  • kwin/effects.h (0d57339)
  • kwin/effects.cpp (bbf5a45)
  • kwin/effects/boxswitch/boxswitch.h (c0258a8)
  • kwin/effects/boxswitch/boxswitch.cpp (5a09382)
  • kwin/effects/coverswitch/coverswitch.h (26e9a4f)
  • kwin/effects/coverswitch/coverswitch.cpp (45c7621)
  • kwin/effects/cube/cube.h (c04a865)
  • kwin/effects/cube/cube.cpp (91997bd)
  • kwin/effects/cube/cubeslide.h (66f96ad)
  • kwin/effects/cube/cubeslide.cpp (a1332ea)
  • kwin/effects/dashboard/dashboard.h (4b3cbaf)
  • kwin/effects/dashboard/dashboard.cpp (ccee74b)
  • kwin/effects/dialogparent/dialogparent.h (c966f60)
  • kwin/effects/dialogparent/dialogparent.cpp (d5a8d3f)
  • kwin/effects/dimscreen/dimscreen.h (744d114)
  • kwin/effects/dimscreen/dimscreen.cpp (cb1df9f)
  • kwin/effects/explosion/explosion.h (b112ab1)
  • kwin/effects/explosion/explosion.cpp (75f56ac)
  • kwin/effects/fade/fade.h (c26298a)
  • kwin/effects/fade/fade.cpp (52f0e37)
  • kwin/effects/fadedesktop/fadedesktop.h (caee1a6)
  • kwin/effects/fadedesktop/fadedesktop.cpp (d07b9ac)
  • kwin/effects/fallapart/fallapart.h (a29ea0b)
  • kwin/effects/fallapart/fallapart.cpp (16fd613)
  • kwin/effects/flipswitch/flipswitch.h (d06005e)
  • kwin/effects/flipswitch/flipswitch.cpp (b68c1c9)
  • kwin/effects/glide/glide.h (bb793dd)
  • kwin/effects/glide/glide.cpp (717bd54)
  • kwin/effects/highlightwindow/highlightwindow.h (c13a887)
  • kwin/effects/highlightwindow/highlightwindow.cpp (b175620)
  • kwin/effects/invert/invert.h (0d79ba4)
  • kwin/effects/invert/invert.cpp (6929880)
  • kwin/effects/login/login.h (67b4d7e)
  • kwin/effects/login/login.cpp (fd26f52)
  • kwin/effects/logout/logout.h (a6a00f8)
  • kwin/effects/logout/logout.cpp (7880dae)
  • kwin/effects/lookingglass/lookingglass.h (cba2242)
  • kwin/effects/lookingglass/lookingglass.cpp (783823e)
  • kwin/effects/magiclamp/magiclamp.h (774ddb7)
  • kwin/effects/magiclamp/magiclamp.cpp (6f2c6ea)
  • kwin/effects/magnifier/magnifier.h (0e4e675)
  • kwin/effects/magnifier/magnifier.cpp (3e216f6)
  • kwin/effects/minimizeanimation/minimizeanimation.h (20fa156)
  • kwin/effects/minimizeanimation/minimizeanimation.cpp (8eb87c4)
  • kwin/effects/mousemark/mousemark.h (22094be)
  • kwin/effects/mousemark/mousemark.cpp (733f94af)
  • kwin/effects/outline/outline.h (9c144b4)
  • kwin/effects/outline/outline.cpp (d2990e0)
  • kwin/effects/scalein/scalein.h (6038bf0)
  • kwin/effects/scalein/scalein.cpp (732646d)
  • kwin/effects/screenshot/screenshot.h (040ef61)
  • kwin/effects/screenshot/screenshot.cpp (d12d77d)
  • kwin/effects/sheet/sheet.h (a2bb1ba)
  • kwin/effects/sheet/sheet.cpp (c28a388)
  • kwin/effects/slide/slide.h (9ad645e)
  • kwin/effects/slide/slide.cpp (3e0df05)
  • kwin/effects/slidingpopups/slidingpopups.h (bc58f95)
  • kwin/effects/slidingpopups/slidingpopups.cpp (4ffd3e2)
  • kwin/effects/snaphelper/snaphelper.h (b2ab2e0)
  • kwin/effects/snaphelper/snaphelper.cpp (8b12532)
  • kwin/effects/startupfeedback/startupfeedback.h (1e272c9)
  • kwin/effects/startupfeedback/startupfeedback.cpp (0d2884b)
  • kwin/effects/taskbarthumbnail/taskbarthumbnail.h (5412fe9)
  • kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp (7761ba5)
  • kwin/effects/thumbnailaside/thumbnailaside.h (e1af63e)
  • kwin/effects/thumbnailaside/thumbnailaside.cpp (99bcf9a)
  • kwin/effects/trackmouse/trackmouse.h (e78c384)
  • kwin/effects/trackmouse/trackmouse.cpp (14fe15a)
  • kwin/effects/windowgeometry/windowgeometry.h (d9b632b)
  • kwin/effects/windowgeometry/windowgeometry.cpp (d682751)
  • kwin/effects/wobblywindows/wobblywindows.h (d6b262b)
  • kwin/effects/wobblywindows/wobblywindows.cpp (f70d7e0)
  • kwin/effects/zoom/zoom.h (fee4dd1)
  • kwin/effects/zoom/zoom.cpp (31d4c78)
  • kwin/libkwineffects/kwineffects.h (d75d64d)
  • kwin/libkwineffects/kwineffects.cpp (857cc42)

View Diff