pluginmanager: cache list of preferred plugins
ClosedPublic

Authored by elvisangelaccio on Nov 28 2016, 11:58 AM.

Details

Summary

PluginManager::preferredPluginsFor() is an hot path as it can be called
thousands of times from the extractfileitemaction plugin.
We can save the list of preferred plugins in a cache, instead of
re-computing it over and over again.

BUG: 372999
FIXED-IN: 16.11.90

Test Plan

Tested in Dolphin by right-clicking:

  • 1K files: no delay
  • 10K files: ~1 sec. of delay
  • 50K files: ~4 sec. of delay

The (empty) test files were created with:

printf '%s ' {1..1000} | xargs touch

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to pluginmanager: cache list of preferred plugins.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptNov 28 2016, 11:58 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
rthomsen accepted this revision.Nov 29 2016, 6:34 PM
rthomsen edited edge metadata.
This revision is now accepted and ready to land.Nov 29 2016, 6:34 PM
This revision was automatically updated to reflect the committed changes.