IRC on-join sluggishness, profiled
paul at darkrain42.org
Tue Jun 21 01:00:01 EDT 2011
And Paul Aurich spoke on 06/18/2011 08:18 PM, saying:
> I've attached one patch which greatly improves purple_conv_chat_cb_find's
> behavior (it's a significant pig), though we'd need to bump up to 2.9.0
> with this.
Based on Ethan's suggestion, I replaced that patch with a hash table in the
> The remaining big chunk of time is spent in this call chain:
> This is naturally called once for each user in the WHO, and there are a few
> issues with pidgin_conv_chat_update_user:
> 1) It has an O(n) (n = size of list) search for the current row for the
> chat entry
> 2) The search calls purple_utf8_strcasecmp, which, if I'm reading this
> kcachegrind output right (no guarantee of that), is over half of the cycles
> spent in pidgin_conv_chat_update_user.
With GtkTreeRowReference (thanks again, Ethan!), these are now O(1), and
Anyone who feels like it, please review these (I . I'd like to pluck them
over to the im.pidgin.pidgin.2.9.0 branch tomorrow afternoon, so that IRC
is usable in large channels for the next release.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 900 bytes
Desc: OpenPGP digital signature
More information about the Devel