Improve plugin caching
ClosedPublic

Authored by apol on Jul 4 2019, 1:01 AM.

Details

Summary

Extend the plasmoid startup cache to DataEngines and ContaimentActions.
Include a cache for script engines. In practice it's always the same, we don't
need to check the file system every time.

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.
apol created this revision.Jul 4 2019, 1:01 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 4 2019, 1:01 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
apol requested review of this revision.Jul 4 2019, 1:01 AM
broulik added a subscriber: broulik.Jul 4 2019, 9:59 AM
broulik added inline comments.
src/plasma/pluginloader.cpp
84

Can you move the function implementation out of the class definition, please

120

Remove or use categorized logging

mart added a subscriber: mart.Jul 4 2019, 10:00 AM
mart added inline comments.
src/plasma/pluginloader.cpp
120

let's go with categorized

davidedmundson accepted this revision.Jul 4 2019, 10:03 AM
davidedmundson added a subscriber: davidedmundson.

Drop the qDebug

I would suggest waiting till after the frameworks tag.

This revision is now accepted and ready to land.Jul 4 2019, 10:03 AM
apol marked 3 inline comments as done.Jul 4 2019, 10:06 AM
mart accepted this revision.Jul 4 2019, 10:10 AM

move implementation out of definition and then ready to go

apol updated this revision to Diff 61122.Jul 4 2019, 10:24 AM

addressed comments

This revision was automatically updated to reflect the committed changes.
wbauer added a subscriber: wbauer.Sep 30 2019, 8:26 AM
wbauer added inline comments.
src/plasma/pluginloader.cpp
860

Shouldn't this use categorized logging as well?

It causes *lots* of warnings from plasmashell, see https://bugs.kde.org/show_bug.cgi?id=412464

davidedmundson added inline comments.Sep 30 2019, 8:30 AM
src/plasma/pluginloader.cpp
860

Changed.
Though that won't stop the warning from appearing.

wbauer added inline comments.Sep 30 2019, 8:45 AM
src/plasma/pluginloader.cpp
860

True. Maybe it would be better to downgrade it to qCDebug()?
(until the existing invalid metadata is fixed at least)

I don't know the situation well enough to know whether it's valid that it's invalid or not. Let's follow that up in your bug report.

I don't know the situation well enough to know whether it's valid that it's invalid or not. Let's follow that up in your bug report.

The problem apparently is that the mentioned plugins have their metadata in a .desktop file, but the code here creates the KFileMetaData from the .so file (so the metadata is empty).
See the bug report for more details.