Fix CPU spin on joining large room
checkIfAlone() filters the whole member list, which is fine until we do it once for every membership event, then we have an n^2 problem. Move it into the rate limited function. Fixes https://github.com/vector-im/riot-web/issues/7163
This commit is contained in:
parent
c00610cb2c
commit
852d6a3be5
1 changed files with 1 additions and 1 deletions
|
@ -701,7 +701,6 @@ module.exports = React.createClass({
|
|||
}
|
||||
|
||||
this._updateRoomMembers();
|
||||
this._checkIfAlone(this.state.room);
|
||||
},
|
||||
|
||||
onRoomMemberMembership: function(ev, member, oldMembership) {
|
||||
|
@ -717,6 +716,7 @@ module.exports = React.createClass({
|
|||
// refresh the conf call notification state
|
||||
this._updateConfCallNotification();
|
||||
this._updateDMState();
|
||||
this._checkIfAlone(this.state.room);
|
||||
}, 500),
|
||||
|
||||
_checkIfAlone: function(room) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue