Bug CPU load on account disconnect with big number of contacts
I have been noticing long times to disconnect accounts with a lot of contacts (be them offline or not).
Taking a look into it today we found that there is a lot of duplication in calls to draw_contact, draw_avatar, draw_group and draw_account (for instance, when an accound is going offline, for all its contacts draw_account is called.
The attached patch makes the behaviour much more reasonable.