Similar to KPackage's cache this speeds up startup where plugins are repeatedly looked up.
Especially the fallback path of looking in the plugin root directly causes quite some slowdown.
Details
Details
- Reviewers
davidedmundson mart - Group Reviewers
Plasma - Commits
- R242:af01c2e95370: [Plasma PluginLoader] Cache plugins during startup
Speeds up plasmashell startup by ~175ms both with and without dropped caches on my laptop
Verified that all applets load fine and that adding applets (both QML-only and C++ applets) after the startup period works fine
Diff Detail
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.
src/plasma/pluginloader.cpp | ||
---|---|---|
220–230 | Nitpick: IMHO, it would be better to move these two down (right before if (useRuntimeCache) {). So, cache invalidation and cache population stuff goes first, then querying stuff. |
src/plasma/pluginloader.cpp | ||
---|---|---|
195 | Seems the wrong approach we know the ID, there's no point iterating in the first place. |
src/plasma/pluginloader.cpp | ||
---|---|---|
195 | We know the ID but not the file name of the library, so findPlugin won't work. |