[Kde-hardware-devel] speed improvements for solid, + QWeakPointer usage

Aaron J. Seigo aseigo at kde.org
Thu Nov 19 06:40:42 CET 2009


hi ...

the hotplug DataEngine in Plasma used to have horrific start up time. it 
improved to merely poor in recent times. ;) so i worked on it a bit more and 
got it down to "ok" before running into walls in Solid (excuse the pun?).

the hotplug DataEngine was, on my system, down to ~95ms for init. ymmv 
depending on the device configuration on your system.

so i went to work on Solid, the resulting patch is attached (it needs to be 
cleaned up some) and it gets it down ~40ms on my system.

the big reasons for improvement are fetching all properties of the device 
instead of one at a time and not creating more device objects than necessary. 
yes, this is all because d-bus sucks performance wise.

we could get even more performance out of this (maybe another 15-20%) by 
having a solid-wide cache of device objects to prevent copying from ever 
taking place no matter what the code path may be. *shrug*

i also took the opportunity to port from QPointer to QWeakPointer.

pls review and comment (i can put it on r-b if you'd prefer; wasn't sure if 
solid is using that yet?)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solid_improvements.diff
Type: text/x-patch
Size: 13718 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20091118/953bed1f/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20091118/953bed1f/attachment.sig 


More information about the Kde-hardware-devel mailing list