D8135: [FrameSvg] Optimize updateSizes
Kai Uwe Broulik
noreply at phabricator.kde.org
Wed Oct 4 10:07:31 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/plasma-devel/attachments/20171004/e640c56f/attachment.html>
More information about the Plasma-devel
mailing list