[FrameSvg] Optimize updateSizes
ClosedPublic

Authored by broulik on Oct 4 2017, 10:07 AM.

Details

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.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Oct 4 2017, 10:07 AM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptOct 4 2017, 10:07 AM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
mart accepted this revision.Oct 4 2017, 10:10 AM
This revision is now accepted and ready to land.Oct 4 2017, 10:10 AM
This revision was automatically updated to reflect the committed changes.