Created attachment 49830 [details] Patch Version: 1.0.0 (using KDE 4.4.5) OS: Linux When having 100+ contacts and going offline, UI locks for about 3-4 seconds. Reproducible: Always Steps to Reproduce: Go online, and then go offline. Actual Results: UI locks for about 3-4 seconds Expected Results: UI doesn't lock. It's caused by many onlineStatusChanged() method calls, and each call invokes a DB query, that is performed by UI thread. My patch creates an additional thread for Statistics Plugin that is responsible for querying the database. UI thread leaves messages in a blocking queue, and DB thread queries the database.
SVN commit 1227533 by lvsouza: Per metacontact statistics DB is created only when contact goes online or when statistics for an offline metacontact is requested. This improves plugin startup and shutdown times and also helps with UI responsiveness. Now shutdown time is proportional to the number of metacontacts that went online since Kopete has started plus the number of offline metacontacts that the user requested statistics from. That is better then being proportional to the number of all metacontacts registered but is not that good yet. BUG: 117989, 138903 CCBUG: 246785 FIXED-IN: 4.6.3 M +34 -2 statisticsplugin.cpp M +2 -0 statisticsplugin.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1227533
SVN commit 1227534 by lvsouza: Backporting 1227533 to 4.6 branch: Per metacontact statistics DB is created only when contact goes online or when statistics for an offline metacontact is requested. This improves plugin startup and shutdown times and also helps with UI responsiveness. Now shutdown time is proportional to the number of metacontacts that went online since Kopete has started plus the number of offline metacontacts that the user requested statistics from. That is better then being proportional to the number of all metacontacts registered but is not that good yet. BUG: 117989, 138903 CCBUG: 246785 FIXED-IN: 4.6.3 M +34 -2 statisticsplugin.cpp M +2 -0 statisticsplugin.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1227534