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