Revision a7b9889...
Go back to digest for 27th April 2014Optimization in Networking Tools
David Edmundson committed changes in [ktp-common-internals/kde-telepathy-0.8] /Models:
Remove internal countContacts function
This method counted the contacts in a group every time a contact in that
group changed. This meant on every insertion we would loop through the
entire set of contacts to make the new count.
Assuming all contacts come online we end up making contacts^2 calls to
data() which is obviously really slow. On my system KPeople::data()
showed over 300,000 calls on load
Instead strip this code and re-insert a simple filter at the contact
list level (see patch to contact list)
File Changes
Modified 2 files
- /Models
- KTp/contacts-filter-model.cpp
- KTp/contacts-filter-model.h
2 files changed in total