From kwin Fri Jan 24 13:17:26 2014 From: =?utf-8?q?Martin_Gr=C3=A4=C3=9Flin?= Date: Fri, 24 Jan 2014 13:17:26 +0000 To: kwin Subject: Re: Review Request 115073: Turn built-in effects into a library kwin links against Message-Id: <20140124131726.10270.41830 () probe ! kde ! org> X-MARC-Message: https://marc.info/?l=kwin&m=139056946527964 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0080333791330130879==" --===============0080333791330130879== Content-Type: multipart/alternative; boundary="===============7170051323754292578==" --===============7170051323754292578== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115073/ ----------------------------------------------------------- (Updated Jan. 24, 2014, 1:17 p.m.) Status ------ This change has been marked as submitted. Review request for kwin. Repository: kde-workspace Description ------- As all effects have always been compiled into the same .so file it's questionable whether resolving the effects through a library is useful at all. By linking against the built-in effects we gain the following advantages: * don't have to load/unload the KLibrary * don't have to resolve the create, supported and enabled functions * no version check required * no dependency resolving (effects don't use it) * remove the KWIN_EFFECT macros from the effects All the effects are now registered in an effects_builtins file which maps the name to a factory method and supported or enabled by default methods. During loading the effects we first check whether there is a built-in effect by the given name and make a shortcut to create it through that. If that's not possible the normal plugin loading is used. Completely unscientific testing [1] showed an improvement of almost 10 msec during loading all the effects I use. [1] QElapsedTimer around the loading code, start kwin five times, take average. Diffs ----- kwin/effects/trackmouse/trackmouse.cpp 21ec1db kwin/effects/windowgeometry/windowgeometry.cpp 3c20bb2 kwin/effects/wobblywindows/wobblywindows.cpp 271f7ba kwin/effects/zoom/zoom.cpp 97848ae kwin/effects/mouseclick/mouseclick.cpp 22b28e7 kwin/effects/mousemark/mousemark.cpp 88cee2f kwin/effects/presentwindows/presentwindows.cpp a0120b5 kwin/effects/resize/resize.cpp 86b106f kwin/effects/screenedge/screenedgeeffect.cpp 7661ede kwin/effects/screenshot/screenshot.cpp be3c9f0 kwin/effects/sheet/sheet.cpp ee5eddf kwin/effects/showfps/showfps.cpp 1324165 kwin/effects/showpaint/showpaint.cpp 5a7a044 kwin/effects/slide/slide.cpp 7ed5408 kwin/effects/slideback/slideback.cpp f280e03 kwin/effects/slidingpopups/slidingpopups.cpp 823023e kwin/effects/snaphelper/snaphelper.cpp a8cd1a9 kwin/effects/startupfeedback/startupfeedback.cpp d700138 kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp 0321d6a kwin/effects/thumbnailaside/thumbnailaside.cpp 6a753a4 kwin/CMakeLists.txt ad92a79 kwin/effects.h 7ccde39 kwin/effects.cpp ec1a310 kwin/effects/CMakeLists.txt d1e2b0d kwin/effects/blur/blur.cpp 9b40281 kwin/effects/coverswitch/coverswitch.cpp 0e2d581 kwin/effects/cube/cube.cpp 8b01070 kwin/effects/dashboard/dashboard.cpp 6e11d6d kwin/effects/desktopgrid/desktopgrid.cpp 6455c38 kwin/effects/diminactive/diminactive.cpp 6a4a287 kwin/effects/dimscreen/dimscreen.cpp 8155449 kwin/effects/effect_builtins.h PRE-CREATION kwin/effects/effect_builtins.cpp PRE-CREATION kwin/effects/fallapart/fallapart.cpp ace7868 kwin/effects/flipswitch/flipswitch.cpp 008fd55 kwin/effects/glide/glide.cpp b133858 kwin/effects/highlightwindow/highlightwindow.cpp 647b47b kwin/effects/invert/invert.cpp 03ce15d8 kwin/effects/kscreen/kscreen.cpp 5747425 kwin/effects/logout/logout.cpp 5e19469 kwin/effects/lookingglass/lookingglass.cpp 31edd1d kwin/effects/magiclamp/magiclamp.cpp 8595168 kwin/effects/magnifier/magnifier.cpp 1159134 kwin/effects/minimizeanimation/minimizeanimation.cpp 6d4f388 Diff: https://git.reviewboard.kde.org/r/115073/diff/ Testing ------- Thanks, Martin Gräßlin --===============7170051323754292578== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115073/

This change has been marked as submitted.


Review request for kwin.
By Martin Gräßlin.

Updated Jan. 24, 2014, 1:17 p.m.

Repository: kde-workspace

Description

As all effects have always been compiled into the same .so file it's
questionable whether resolving the effects through a library is useful
at all. By linking against the built-in effects we gain the following
advantages:
* don't have to load/unload the KLibrary
* don't have to resolve the create, supported and enabled functions
* no version check required
* no dependency resolving (effects don't use it)
* remove the KWIN_EFFECT macros from the effects

All the effects are now registered in an effects_builtins file which
maps the name to a factory method and supported or enabled by default
methods.

During loading the effects we first check whether there is a built-in
effect by the given name and make a shortcut to create it through that.
If that's not possible the normal plugin loading is used.

Completely unscientific testing [1] showed an improvement of almost 10
msec during loading all the effects I use.

[1] QElapsedTimer around the loading code, start kwin five times, take
average.

Diffs

  • kwin/effects/trackmouse/trackmouse.cpp (21ec1db)
  • kwin/effects/windowgeometry/windowgeometry.cpp (3c20bb2)
  • kwin/effects/wobblywindows/wobblywindows.cpp (271f7ba)
  • kwin/effects/zoom/zoom.cpp (97848ae)
  • kwin/effects/mouseclick/mouseclick.cpp (22b28e7)
  • kwin/effects/mousemark/mousemark.cpp (88cee2f)
  • kwin/effects/presentwindows/presentwindows.cpp (a0120b5)
  • kwin/effects/resize/resize.cpp (86b106f)
  • kwin/effects/screenedge/screenedgeeffect.cpp (7661ede)
  • kwin/effects/screenshot/screenshot.cpp (be3c9f0)
  • kwin/effects/sheet/sheet.cpp (ee5eddf)
  • kwin/effects/showfps/showfps.cpp (1324165)
  • kwin/effects/showpaint/showpaint.cpp (5a7a044)
  • kwin/effects/slide/slide.cpp (7ed5408)
  • kwin/effects/slideback/slideback.cpp (f280e03)
  • kwin/effects/slidingpopups/slidingpopups.cpp (823023e)
  • kwin/effects/snaphelper/snaphelper.cpp (a8cd1a9)
  • kwin/effects/startupfeedback/startupfeedback.cpp (d700138)
  • kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp (0321d6a)
  • kwin/effects/thumbnailaside/thumbnailaside.cpp (6a753a4)
  • kwin/CMakeLists.txt (ad92a79)
  • kwin/effects.h (7ccde39)
  • kwin/effects.cpp (ec1a310)
  • kwin/effects/CMakeLists.txt (d1e2b0d)
  • kwin/effects/blur/blur.cpp (9b40281)
  • kwin/effects/coverswitch/coverswitch.cpp (0e2d581)
  • kwin/effects/cube/cube.cpp (8b01070)
  • kwin/effects/dashboard/dashboard.cpp (6e11d6d)
  • kwin/effects/desktopgrid/desktopgrid.cpp (6455c38)
  • kwin/effects/diminactive/diminactive.cpp (6a4a287)
  • kwin/effects/dimscreen/dimscreen.cpp (8155449)
  • kwin/effects/effect_builtins.h (PRE-CREATION)
  • kwin/effects/effect_builtins.cpp (PRE-CREATION)
  • kwin/effects/fallapart/fallapart.cpp (ace7868)
  • kwin/effects/flipswitch/flipswitch.cpp (008fd55)
  • kwin/effects/glide/glide.cpp (b133858)
  • kwin/effects/highlightwindow/highlightwindow.cpp (647b47b)
  • kwin/effects/invert/invert.cpp (03ce15d8)
  • kwin/effects/kscreen/kscreen.cpp (5747425)
  • kwin/effects/logout/logout.cpp (5e19469)
  • kwin/effects/lookingglass/lookingglass.cpp (31edd1d)
  • kwin/effects/magiclamp/magiclamp.cpp (8595168)
  • kwin/effects/magnifier/magnifier.cpp (1159134)
  • kwin/effects/minimizeanimation/minimizeanimation.cpp (6d4f388)

View Diff

--===============7170051323754292578==-- --===============0080333791330130879== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --===============0080333791330130879==--