librelist archives

« back to archive

Slow load time/freezing

Slow load time/freezing

From:
Justin Stefani
Date:
2014-10-21 @ 20:37
Hi, I've integrated with converse and have been developing/testing in a QA
environment where the number of roster contacts is about 200, but the
number of contacts online is very low (~5). I recently moved to another
environment where there is a similar amount of roster contacts, but a
greater number of people signed in with a presence other than offline. The
time it takes to go from an initial roster view (where I can just see the
roster list) to the point where we have the presence of each contact is
much longer than it was in the QA environment (~20-30 seconds more). What
is more concerning is that the rest of the web page freezes entirely until
converse has finished its loading. At first glance it appears to be related
to the sorting of roster contacts after they have been added - so somewhere
around when the presence is retrieved and the roster goes through a second
round of sorting.

Is there anything that can be done to either speed up the loading to a
point where its usable, or at least have it initialize in the "background"
so that the rest of the web page is still usable?

Thanks!

Re: [conversejs] Slow load time/freezing

From:
Jc Brand
Date:
2014-10-23 @ 13:33
On Tue, Oct 21, 2014 at 04:37:30PM -0400, Justin Stefani wrote:
>    Hi, I've integrated with converse and have been developing/testing in a QA
>    environment where the number of roster contacts is about 200, but the
>    number of contacts online is very low (~5). I recently moved to another
>    environment where there is a similar amount of roster contacts, but a
>    greater number of people signed in with a presence other than offline. The
>    time it takes to go from an initial roster view (where I can just see the
>    roster list) to the point where we have the presence of each contact is
>    much longer than it was in the QA environment (~20-30 seconds more). What
>    is more concerning is that the rest of the web page freezes entirely until
>    converse has finished its loading. At first glance it appears to be
>    related to the sorting of roster contacts after they have been added - so
>    somewhere around when the presence is retrieved and the roster goes
>    through a second round of sorting.
>    Is there anything that can be done to either speed up the loading to a
>    point where its usable, or at least have it initialize in the "background"
>    so that the rest of the web page is still usable?

This is pretty much a known issue and there is a ticket for it:
https://github.com/jcbrand/converse.js/issues/151

In the ticket is a suggested optimization and a pull request with the change
was promised but so far hasn't materialized.

If I were to tackle this problem, I would create a reproducible
test where I programmatically add hundreds of buddies and then change
their statuses.

I would then profile the code while running this test to see which sections of
the code are causing the bottlenecks.

JC