[Shell Corona] Avoid iterating keys() and then doing a value() lookup

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



Use iterators and their key() and value() methods.

This codepath is hit 200+ times on plasmashell startup for me
Before: 420,000 ns
After: 200,000 ns

Test Plan

Still looking good, notification popup positioned correctly and whatnot.

Diff Detail

R120 Plasma Workspace
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 10718.Jan 30 2017, 1:32 PM
broulik retitled this revision from to [Shell Corona] Avoid iterating keys() and then doing a value() lookup.
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 R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 30 2017, 1:32 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik updated this object.Jan 30 2017, 1:32 PM
mart accepted this revision.Jan 30 2017, 1:35 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Jan 30 2017, 1:35 PM
This revision was automatically updated to reflect the committed changes.