-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change/Fix: Cache computed displaynames
When a user's displayname was unset, we did not cache the computed displayname. In most cases that seemed to be no problem; but in the case of a direct room in which the other user had no displayname set, it would mean iterating over the events and looking for one setting the displayname every time that EMENT--USER-DISPLAYNAME-IN is called. When the room list buffer is updated, that function is called for each such room; over time, as such rooms' gain more events, that means taking longer to iterate over them, which means taking longer to update the room list buffer. Now we cache the computed displayname even if unset; and if a new member event comes in that sets the displayname, we force recalculation. Fixes #298. Reported-by: Rutherther <https://github.com/Rutherther>
- Loading branch information
Showing
3 changed files
with
42 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters