[FrameData] Avoid iterating keys()
ClosedPublic

Authored by broulik on Jan 30 2017, 1:36 PM.

Details

Summary

Instead use iterators. Could be changed to using keyBegin or something like that potentially.

The destructor is called 400 times on plasmashell startup for me.
Before: 250,000ns
After: 110,000ns

Test Plan

It's interesting that there's so many FrameData objects that are created and destroyed on startup.

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 updated this revision to Diff 10719.Jan 30 2017, 1:36 PM
broulik retitled this revision from to [FrameData] Avoid iterating keys().
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R242 Plasma Framework (Library).
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 30 2017, 1:36 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
mart accepted this revision.Jan 30 2017, 1:39 PM
mart added a reviewer: mart.
mart added a subscriber: mart.

it would also be interesting to see why the destructor is being called so many times at startup (some model somewhere emitting resets that shouldn't?).. as at startup.. one would expect things are mostly created..

This revision is now accepted and ready to land.Jan 30 2017, 1:39 PM
This revision was automatically updated to reflect the committed changes.