[ExtractorCollection] Load extractor plugins lazily

Authored by bruns on Feb 23 2019, 12:39 AM.

Description

[ExtractorCollection] Load extractor plugins lazily

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

Reviewers: Baloo, Frameworks, ngraham, astippich, poboiko

Reviewed By: astippich

Subscribers: kde-frameworks-devel

Tags: Frameworks, Baloo

Differential Revision: https://phabricator.kde.org/D19287

Details

Committed
brunsMar 9 2019, 12:12 AM
Reviewer
astippich
Differential Revision
D19287: [ExtractorCollection] Load extractor plugins lazily
Parents
R286:bf275925d8bc: Revert "[Kfilemetada] Make it compile without foreach"
Branches
Unknown
Tags
Unknown