Hello,
while trying out the statistics plugin (with kopete 4.5.1) I've
noticed a big delay (about 40-50 seconds) when quitting the
application, associated with a disk storm.
When kopete is closing it changes the online status of each contact to
"Unknown"; this change triggers an INSERT for each contact into the
statistics DB which - with the default auto-commit behaviour - result
in a fsync of the DB. The other bottleneck is the tear down of the
statisticsContactMap which triggers multiple updates per each contact.
I tested a few modifications that greatly improved the performance:
* expose transaction control from StatisticsDB
* batch the UPDATEs in the destructor of the plugin into a single transaction
* override plugin's aboutToUnload: disconnect from status update and
manually set to "Unknown" the status of all the contacts in a single
batch.

I already have quick&dirty patch, tested with positive result. Do you
think that the changes are acceptable?

Luca
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to