Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use store.get_users_in_room rather than state handler in typing for speed #7856

Merged
merged 4 commits into from
Jul 15, 2020

Conversation

erikjohnston
Copy link
Member

This might give us a small performance improvement, since get_users_in_room will be cached at a higher layer (and doesn't do state res if it isn't cached).

@@ -185,7 +185,7 @@ def _push_update(self, member, typing):

async def _push_remote(self, member, typing):
try:
users = await self.state.get_current_users_in_room(member.room_id)
users = await self.state.get_users_in_room(member.room_id)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be self.store instead of self.state?

Copy link
Member Author

Choose a reason for hiding this comment

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

sigh, here I thought was a PR I couldn't mess up...

Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Seems OK!

@erikjohnston erikjohnston merged commit 97e1159 into develop Jul 15, 2020
@erikjohnston erikjohnston deleted the erikj/faster_typing branch July 15, 2020 16:41
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.

2 participants