make packageurlinterceptor as noop as possible
ClosedPublic

Authored by mart on Dec 3 2017, 12:29 PM.

Details

Summary

minimize file access during url rewrite

we still need it for accessing stuff under code/

Test Plan

plasma still loads, seems to save ~2%

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.
mart created this revision.Dec 3 2017, 12:29 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptDec 3 2017, 12:29 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
mart requested review of this revision.Dec 3 2017, 12:29 PM
apol added a subscriber: apol.Dec 3 2017, 2:50 PM

Wow that's a lot of code gone!

src/plasmaquick/packageurlinterceptor.cpp
111–112

Only call toString() once, also put in a variable.
Also we can use the information from the first match to do the replace so we don't have to execute the regex twice, if it's a hot path.

mart updated this revision to Diff 23397.Dec 3 2017, 7:58 PM

only toString once

ngraham added a subscriber: ngraham.Dec 4 2017, 5:07 PM
This revision was automatically updated to reflect the committed changes.
davidedmundson reopened this revision.Dec 4 2017, 7:38 PM
davidedmundson added a subscriber: davidedmundson.

Was pushed in a branch, not master. Reopening on phab

mart updated this revision to Diff 23490.Dec 5 2017, 11:57 AM
  • use kpackage_install_bundled_package
mart updated this revision to Diff 23899.Dec 14 2017, 11:40 AM
  • manage all cases for packages and check for file existence beforehand
mart updated this revision to Diff 23905.Dec 14 2017, 12:53 PM
  • make rewriting of both files and qrc work
mart updated this revision to Diff 23906.Dec 14 2017, 12:59 PM
  • extra warning
davidedmundson accepted this revision.Dec 18 2017, 11:51 AM
This revision is now accepted and ready to land.Dec 18 2017, 11:51 AM
This revision was automatically updated to reflect the committed changes.