[PATCH] Speeding up kabc
Reinhold Kainhofer
reinhold at kainhofer.com
Sun Oct 5 10:10:22 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Attached is a patch for libkabc, which turns the [] operator in the
VCard::lines(..) method from the non-const operator to the const operator. As
a consequence, the returned list - if empty - is not added to the map, which
is not a problem, as it is only used to generate the VCARD string or the
addressee object using iterators (but nowhere is the returned list modified).
For adding lines we have the VCard::addLine method anyway.
This gives a tremendous loading speedup for all applications using libkabc.
E.g. I did some tests with korganizer (just starting it and then quitting).
Before the patch about 15% (!!) of the overall costs were spent in the
VCard::lines() method, after the patch that number goes down to 5%, so this
patch provides more than 10% overall speedup...
Okay to apply?
Reinhold
PS: I'm crossposting to pim and core-devel, as both might be affected by this.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/f+ABTqjEwhXvPN0RAmQdAKCu+wKB4m3Q1rJ2hKO9XNHdI9jU/ACeK+f1
gC3gRE5fQFPDt216VaOejA4=
=eb82
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2003-10-05_KABC_LineQMap_Speedup.patch
Type: text/x-diff
Size: 1809 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031005/08c2b249/attachment.patch>
More information about the kde-core-devel
mailing list