[Kde-pim] Review Request: Improve search peformance

Kevin Krammer kevin.krammer at gmx.at
Wed May 20 12:07:27 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/730/
-----------------------------------------------------------

Review request for KDE PIM and Tobias Koenig.


Summary
-------

The change to search all values of fields has resulted in a major slowdown of SearchManager::search().

The elseif string comparison chain is quite obviously the main factor of that, so this patch replaces it with a QHash lookup which maps the label to an appropriate function pointer for getting the field's values.


Diffs
-----

  /trunk/KDE/kdepim/kaddressbook/searchmanager.h 970220 
  /trunk/KDE/kdepim/kaddressbook/searchmanager.cpp 970220 

Diff: http://reviewboard.kde.org/r/730/diff


Testing
-------

Primitive benchmarking using QTime::elapsed() indicates the new code is about 10 to 20 times faster, but still quite slower than the original code.


Thanks,

Kevin

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list