Speed up building user sidebar during page load.

We now call activity.build_user_sidebar when we initialize
the user sidebar, which avoids some janky jQuery code
that was intended for partial updates.

With 2000 users in dev, the amount of time to build the sidebar
decreases from 1100ms to 700ms in my tests.  (Times vary a bit,
but it does seem consistently faster now.)
This commit is contained in:
Steve Howell
2017-02-20 17:10:54 -08:00
parent 2aa7d20a51
commit d4206f2f5f

View File

@@ -458,8 +458,10 @@ exports.initialize = function () {
focus_ping();
activity.set_user_statuses(page_params.initial_presences,
activity.set_presence_info(page_params.initial_presences,
page_params.initial_servertime);
exports.build_user_sidebar();
exports.update_huddles();
};
// Set user statuses. `users` should be an object with user emails as keys