Optimization in KDE Base
Run the query through KServiceTyperTrader as well
to allow performance comparison. This actually reveals that we're only
faster when querying for the first time. All subsequent queries are
blazingly fast (down to 32 microseconds on this machine), KPluginTrader
without caching takes in the range of 24 milliseconds, with caching it
gets down to 4 - 6 milliseconds.
Perhaps we can speed subsequent queries up by keeping the json structure
read from disk in memory to speed up subsequent queries as well.
In any case, with caching it's much faster already.
Note: to create the cache files, you need to build
kcoreaddons[sebas/kpluginindex] and run
(Use -a -r to remove all index files).