After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 665207 - empathy_contact_get_persona() is crack
empathy_contact_get_persona() is crack
Status: RESOLVED DUPLICATE of bug 665853
Product: empathy
Classification: Core
Component: Meta Contacts
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 665376
Blocks:
 
 
Reported: 2011-11-30 14:32 UTC by Guillaume Desmottes
Modified: 2011-12-09 11:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2011-11-30 14:32:31 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()?
Comment 1 Travis Reitter 2011-12-05 18:28:30 UTC
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.
Comment 2 Guillaume Desmottes 2011-12-09 11:29:12 UTC
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 ***