[ExtractorCollection] Load extractor plugins lazily
ClosedPublic

Authored by bruns on Feb 24 2019, 9:13 PM.

Details

Summary

In many cases, only a few plugins are required, or even only one
(e.g. for baloo-widgets, baloo_filemetadata_temp_extractor) or none
(in case there is no extractor for a given mimetype).

Loading of plugins is somewhat costly, so delay loading of plugins until
they are requested by fetchExtractors(mimetype).

For e.g. extracting tags from an mp3 file, which only requires the
taglibextractor, the runtime is reduced by more than 90%.

Test Plan

ctest
valgrind --tool=callgrind

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Feb 24 2019, 9:13 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptFeb 24 2019, 9:13 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Feb 24 2019, 9:13 PM
astippich accepted this revision.Mar 8 2019, 1:29 PM
This revision is now accepted and ready to land.Mar 8 2019, 1:29 PM
This revision was automatically updated to reflect the committed changes.