c++ plugins with Frameworks 5

Aaron J. Seigo aseigo at kde.org
Tue Mar 4 12:21:20 UTC 2014


On Tuesday, March 4, 2014 11:52:11 David Faure wrote:
> Unless someone has a plan for it, my suggestion would be, let's model it
> after the upcoming app desktop cache, i.e. update it at install time. I'll

This sounds perfect.

In that vein, I did do some measuring of what takes time, and it really is 
nothing surprising. Extracting and parsing the json from the library files 
themselves is fast enough. My 3 year old laptop parse 1000+ plugins' info per 
second, complete with a few dozen translations in each.

What is slow is actually getting the data off disk when the OS’s disk cache is 
cold. SSDs obviously incur less penalty here and rotating disks more. The 
performance on a typical rotating laptop HDD drops to ~50-70 plugins per 
second. Not horrible, but also not awesome.

> But meanwhile this confirms that we won't need .desktop files, so Aaron, you
> can go ahead....

Great :)

If we can eventually get the i18n process using the json directly, then we can 
get rid of the .desktop files altogether. Until then, however, we’ll need to 
keep them. So currently my game plan is this:

* create a small QtCore-only tool that transforms a .desktop file into a .json 
file, without translations

* adapt the tool I already have written that updates translations from 
.desktop files into the json files; it will remain QtCore only

* change the kservice_desktop_to_json cmake macro to use that tool

* adjust KPluginInfo to read the metadata correctly (inc. i18n)

once the app desktop cache is in place, then we can stop installing the 
.desktop files.

once the i18n process has been migrated to use the json files directly, then we 
can remove the .desktop files from the repositories.

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140304/1b9fe347/attachment.sig>


More information about the Kde-frameworks-devel mailing list