D8135: [FrameSvg] Optimize updateSizes

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Oct 4 10:07:32 UTC 2017


broulik created this revision.
broulik added a reviewer: Plasma.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.

REVISION SUMMARY
  frame->fooHeight is the same as frame->fooFixedHeight if the border is enabled, we only meddle with margins, not heights. Thus we can just do the lookup once and re-use the value.
  
  Also store the hintFooMargin instead of doing the same exact lookup once for fixed and once for non-fixed margins.

TEST PLAN
  Called 2200 times on plasmashell startup, saves 40ms in total.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D8135

AFFECTED FILES
  src/plasma/framesvg.cpp

To: broulik, #plasma
Cc: plasma-devel, #frameworks, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171004/e640c56f/attachment.html>


More information about the Kde-frameworks-devel mailing list