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 684898 - empathy-chat is very slow to start
empathy-chat is very slow to start
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 671636
Blocks:
 
 
Reported: 2012-09-26 17:48 UTC by Lennart Poettering
Modified: 2012-10-08 20:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lennart Poettering 2012-09-26 17:48:07 UTC
On my 8 core, 8GB machine opening an Empathy window takes ~6s. An empty one that is, with no history, to somebody I never have talked to before, i.e. totally pristine. (Talking to somebody with a history takes even longer...)

I can boot up my kernel, initrd and userspace in less time than that...

Not sure what Empathy is doing there, but really, 6s is enough to make empathy feel very sluggish and no fun at all. Using the G+ chat in firefox is much faster, as they take at max 2s to start-up.
Comment 1 Lennart Poettering 2012-09-26 17:48:24 UTC
~$ rpm -qa empathy
empathy-3.5.92-2.fc18.x86_64
Comment 2 Xavier Claessens 2012-09-27 08:53:52 UTC
This is because of folks: https://bugzilla.gnome.org/show_bug.cgi?id=671636

But IMO empathy-chat should not load folks at all, showing the merged contact instead of the individual you're chatting with is useless waste of CPU/RAM.
Comment 3 Guillaume Desmottes 2012-09-27 09:14:46 UTC
Folks is indeed taking a lot of time to load but 6 seconds is indeed way too much. I just tested with the same version on my Eee test box and it took less than 2 seconds to open the chat window.

Do you have a huge evolution address book configured like a big LDAP or something?
Comment 4 Lennart Poettering 2012-09-27 10:26:22 UTC
(In reply to comment #3)

> Do you have a huge evolution address book configured like a big LDAP or
> something?

I nevered used Evolution and never hand-added any contacts to the evolution address book. However, I sign up to my Facebook and Google account, which together have ~2000 addresses or so.
Comment 5 Xavier Claessens 2012-09-27 10:39:02 UTC
Your google account is setup in gnome-online-accounts? which would make EDS important your google contacts... But yeah 2000 is clearly above what folks can reasonably handle, which is a shame I agree ;)
Comment 6 Travis Reitter 2012-09-27 16:27:02 UTC
(In reply to comment #2)
> This is because of folks: https://bugzilla.gnome.org/show_bug.cgi?id=671636

This certainly looks possible.

Let's set that as a blocker rather than make this a duplicate, since it's possible there's more going on than this EDS (backend) bottleneck.

> But IMO empathy-chat should not load folks at all, showing the merged contact
> instead of the individual you're chatting with is useless waste of CPU/RAM.

I humbly disagree. In any system I've got contacts from multiple sources (including my phone, etc.), I want one consistent view of each person.

Specific usernames and which service they're on are really uninteresting to me. I'm interested in who I'm actually talking with.
Comment 7 Manuel Amador (Rudd-O) 2012-09-28 07:41:23 UTC
Just make it fast, people.  No synchronous operations, cache, whatever it takes.
Comment 8 Guillaume Desmottes 2012-09-28 09:12:58 UTC
Lennart: any chance you could test this branch and check if it improves things for you?

http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=empathy-chat-684898
git://git.collabora.co.uk/git/user/cassidy/empathy empathy-chat-684898

It's a bit hacky but I think it should really improve the reactivity of empathy-chat. You'll have to build it and replace 
/usr/libexec/empathy-chat by the one in src/empathy-chat to make sure it's invoked when starting your first conversation.
Comment 9 Xavier Claessens 2012-10-02 14:14:02 UTC
+ g_value_set_pointer (value, self->priv->individual_mgr);

g_value_set_object() no?
Comment 10 Guillaume Desmottes 2012-10-03 10:06:48 UTC
(In reply to comment #9)
> + g_value_set_pointer (value, self->priv->individual_mgr);
> 
> g_value_set_object() no?

Good catch, fixed.

I'm going to release 3.6.0.1 soon. I'd appreciate feedback from people experiencing this issue to know if that improves things for them.
Comment 11 Lennart Poettering 2012-10-03 14:12:05 UTC
(In reply to comment #8)
> Lennart: any chance you could test this branch and check if it improves things
> for you?
> 
> http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=empathy-chat-684898
> git://git.collabora.co.uk/git/user/cassidy/empathy empathy-chat-684898
> 
> It's a bit hacky but I think it should really improve the reactivity of
> empathy-chat. You'll have to build it and replace 
> /usr/libexec/empathy-chat by the one in src/empathy-chat to make sure it's
> invoked when starting your first conversation.

Tried this. Didn't work. Starting empathy-chat just spits out this and hangs:

$ /usr/libexec/empathy-chat

** (lt-empathy-chat:21469): WARNING **: couldn't load Empathy's default theme template: Failed to open file '/usr/local/share/empathy/Template.html': No such file or directory

** (lt-empathy-chat:21469): CRITICAL **: file empathy-theme-adium.c: line 2045 (empathy_adium_data_new_with_info): should not be reached
I/O warning : failed to load external entity "/usr/local/share/empathy/empathy-chatroom-manager.dtd"

(lt-empathy-chat:21469): empathy-WARNING **: Failed to validate file:'/home/lennart/.config/Empathy/chatrooms.xml'
Comment 12 Lennart Poettering 2012-10-03 14:12:49 UTC
OK, let's redo this with --prefix=/usr...
Comment 13 Lennart Poettering 2012-10-03 14:17:27 UTC
(In reply to comment #12)
> OK, let's redo this with --prefix=/usr...

Much much better. The chat window opens in <1s now. Closing is a bit above 1s on first attempt, but that's OK, too I guess.

I am happy. Thanks for fixing this!
Comment 14 Guillaume Desmottes 2012-10-03 14:56:11 UTC
Cool, thanks for testing!