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

get_room_version doesn't use the cache #11706

Closed
richvdh opened this issue Jan 7, 2022 · 2 comments · Fixed by #11808
Closed

get_room_version doesn't use the cache #11706

richvdh opened this issue Jan 7, 2022 · 2 comments · Fixed by #11808
Labels
good first issue Good for newcomers S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@richvdh
Copy link
Member

richvdh commented Jan 7, 2022

we have two functions for getting the version of a room from the database, get_room_version_id and get_room_version. The former gets the raw string, and then caches it to speed up future lookups. The second looks up the raw string, and then consults the list of known room versions to decode it into a RoomVersion object. The problem is that it doesn't cache the result, so is generally slower than it should be.

If get_room_version needs to exist at all, it should probably just wrap get_room_version_id.

@richvdh
Copy link
Member Author

richvdh commented Jan 7, 2022

seems to be a regression introduced in #10245

@reivilibre reivilibre added good first issue Good for newcomers S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. labels Jan 7, 2022
@lukasdenk
Copy link
Contributor

I'll work on it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants