Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Use cached value to read member count #6429

Merged
merged 3 commits into from
Jul 21, 2021
Merged

Conversation

germain-gg
Copy link
Contributor

@germain-gg germain-gg commented Jul 21, 2021

@germain-gg germain-gg requested a review from a team July 21, 2021 14:10
@germain-gg germain-gg requested a review from t3chguy July 21, 2021 14:44
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

The specific diff looks good, but there are multiple users of the public .members field in this sdk and elsewhere that'll need updating now that it is gone

@germain-gg germain-gg enabled auto-merge July 21, 2021 16:00
@germain-gg germain-gg merged commit 0d8309c into develop Jul 21, 2021
@germain-gg germain-gg deleted the gsouquet/fix-18146 branch July 21, 2021 16:17
Comment on lines +282 to +284
private calculateRoomMembersCount = (): void => {
this.membersCount = this.props.room?.getMembers().length || 0;
};
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't setState so will have a very jarring update behaviour, it'll take effect the render after this fires, weirdly laggy. I don't think this is the right solution and think it does not whatsoever match what I accepted in review. @gsouquet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perf regression on large rooms
3 participants