Commit 74718615 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[thumbnail] Fix reading thumbnail plugins only once

Reading the list of plugins is relatively expensive, so we only want to read them once

ab2660f2 removed the 'static' here, introducing a performance regression
parent 44c4d017
Pipeline #194630 passed with stage
in 1 minute and 50 seconds
......@@ -352,7 +352,7 @@ static QVector<KPluginMetaData> availablePlugins()
}
KPluginMetaData ThumbnailProtocol::pluginForMimeType(const QString& mimeType) {
const QVector<KPluginMetaData> plugins = availablePlugins();
const static QVector<KPluginMetaData> plugins = availablePlugins();
for (const KPluginMetaData &plugin : plugins) {
if (plugin.supportsMimeType(mimeType)) {
return plugin;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment