Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only update the users list when needed #58

Merged
merged 1 commit into from Feb 19, 2016

Conversation

maxpoulin64
Copy link
Member

Currently, for join/part/kick/nick/... the server will send an updated list of users and the client will re-render the list entirely. This ends up being a very expensive operation when joined on large channels and causes the client to slow down a lot.

This patch makes it so the user list is only updated when it is actually visible, avoiding lots and lots of user list re-renders on large channels.

@@ -572,6 +585,11 @@ $(function() {
}
}

if (chan.hasClass("needs-names-refresh")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use data attribute instead?

Currently, for join/part/kick/nick/... the server will send an updated list of users and the client will re-render the list entirely. This ends up being a very expensive operation when joined on large channels and causes the client to slow down a lot.
@xPaw
Copy link
Member

xPaw commented Feb 17, 2016

👍

@AlMcKinlay
Copy link
Member

Yep, looks good to me. Merging 👍

AlMcKinlay added a commit that referenced this pull request Feb 19, 2016
Only update the users list when needed
@AlMcKinlay AlMcKinlay merged commit 972aadd into thelounge:master Feb 19, 2016
@astorije astorije added Type: Feature Tickets that describe a desired feature or PRs that add them to the project. and removed second review needed labels Feb 19, 2016
@astorije astorije assigned xPaw and unassigned xPaw Feb 25, 2016
@maxpoulin64 maxpoulin64 deleted the userlist-lag branch March 6, 2016 06:33
@astorije astorije added this to the 1.2.0 milestone Apr 1, 2017
@xPaw xPaw removed their assignment Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants