Perf: Do expensive regexp construction earlier

Authored by kfunk on Nov 20 2018, 8:52 AM.

Description

Perf: Do expensive regexp construction earlier

Summary:
SystemTray::serviceRegistered is called tons of times; the regexp
construction inside the for-loop is expensive and should be avoided.
Thus construct the regexp once, and re-use the regexp object each time.

Test Plan:
Before:

After:

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: apol, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D17025

Details

Committed
kfunkNov 20 2018, 8:52 AM
Reviewer
davidedmundson
Differential Revision
D17025: Perf: Do expensive regexp construction earlier
Parents
R120:e2ba40a4912a: Fix a few memory leaks
Branches
Unknown
Tags
Unknown