[Differential] [Request, 110 lines] D3768: Performance improvement for VCardTool, which was filling two QMaps in the constructor.

dfaure (David Faure) noreply at phabricator.kde.org
Tue Dec 20 21:30:04 GMT 2016


dfaure created this revision.
dfaure added a reviewer: mlaurent.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.

REVISION SUMMARY
  And the constructor is called very often - once for each contact being {de}serialized
  by Akonadi (see VCardConverter::parseVCards).
  
  Fixed by the usual "static const struct" readonly-data solution (from Marc Mutz in libkleo).
  
  I hit this when using the "Select..." pushbutton in kmail composer, which fills in a model
  with all contacts.

TEST PLAN
  Validated by the unittests (which are the reason why I had to sort both lists
  alphabetically, to match the ordering that was done by QMap previously).

REPOSITORY
  R174 PIM: KContacts

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D3768

AFFECTED FILES
  src/vcardtool.cpp
  src/vcardtool.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dfaure, mlaurent
Cc: kde-pim, spencerb, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20161220/e9a6f2f5/attachment.html>


More information about the kde-pim mailing list