[Notification Job Delegate] Slightly optimize summary label
ClosedPublic

Authored by broulik on Jun 6 2017, 6:20 AM.

Details

Summary

Instead of splitting, just use lastIndexOf and slice.
This is 2x as fast.

Test Plan

Still shows only file name, I didn't check but I verified that slice(0) would return the entire string (which is when there is no slash, ie. indexOf being -1)

Diff Detail

Repository
R120 Plasma Workspace
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.Jun 6 2017, 6:20 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 6 2017, 6:20 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Jun 6 2017, 8:51 AM
This revision is now accepted and ready to land.Jun 6 2017, 8:51 AM
This revision was automatically updated to reflect the committed changes.