GNOME Bugzilla – Bug 665207
empathy_contact_get_persona() is crack
Last modified: 2011-12-09 11:29:12 UTC
I hate this function :) First it starts with this very encouraging comment: /* FIXME: This is disgustingly slow */ Indeed, it iterates over *all* the individuals we know about and then check if each of those has a persona associated with it. So this is slow but also wrong if the individual manager isn't prepared. Typically, empathy-chat shouldn't have to know about all the individuals around so doesn't have any reason to keep an individual manager around during all its lifetime. So this function creates a new individual manager, doesn't find any individual and then destroy it right away! Why not just craft a new TpfPersona from the TpContact as we already do in empathy_create_individual_from_tp_contact()?
Yes, I highly recommend fixing this. It was meant to be some temporary scaffolding, but you know how that works. Excessive use of duct tape. We'll clean up the Folks side in bug 665376.
Closing as a dup of bug #665853 as my branch will fix this as well. *** This bug has been marked as a duplicate of bug 665853 ***