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

Simplify persistance code #16584

Merged
merged 3 commits into from Nov 3, 2023
Merged

Simplify persistance code #16584

merged 3 commits into from Nov 3, 2023

Conversation

clokep
Copy link
Contributor

@clokep clokep commented Oct 31, 2023

We only ever persist events for a single room at once, but the code handles multiple rooms at once this:

  • Makes the code harder to read.
  • Creates an objects which map room ID -> whatever unnecessarily.

I'm not sure if this is desirable if we ever want to be able to persist from multiple rooms at once, but... 馃し

The first commit factors out a method, so should be reviewed separately.

@clokep clokep force-pushed the clokep/persist-single-room branch 2 times, most recently from cf721d3 to db97d2e Compare October 31, 2023 18:38
@clokep clokep marked this pull request as ready for review October 31, 2023 19:30
@clokep clokep requested a review from a team as a code owner October 31, 2023 19:30
Frequently only a single event is persisted at a time so this
will not have an impact, but when multiple events are persisted
at once then there is no need to continually update the stream
change cache *except* for the last change.
@clokep clokep merged commit 92828a7 into develop Nov 3, 2023
39 of 41 checks passed
@clokep clokep deleted the clokep/persist-single-room branch November 3, 2023 11:30
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.

None yet

2 participants