Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store Room States by "roomID|type|statekey" key #1856

Open
1 task done
krille-chan opened this issue Jun 17, 2024 · 1 comment
Open
1 task done

Store Room States by "roomID|type|statekey" key #1856

krille-chan opened this issue Jun 17, 2024 · 1 comment
Assignees

Comments

@krille-chan
Copy link
Contributor

Preflight Checklist

  • I could not find a solution in the existing issues, docs, nor discussions

Describe your problem

Currently we store room states by a roomID|type key and then store a Map of state_key->State Event in this. This produces a out of memory bug if the user has joined a room where there are a lot of states with the same type but different statekeys (not for m.room.member). This makes the app unusable in this case. See here that I ran into this already...

Describe your ideal solution

I've checked out the database code and for the new Matrix SDK Database I don't find a blocker to just move to a roomID|type|statekey triple key. Just needs a refactoring everywhere where we access the two state event boxes. However this would need a change in the behavior of Important State Events as we would no longer be able to say that we want to load all events of a certain type, but need to also specify the state_key (which is an empty String "" in most of the cases). The question is, is this a blocker actually? I don't see any implementation where we aren't able to also define the state_key.

Version

No response

Security requirements

No response

Additional Context

No response

@krille-chan
Copy link
Contributor Author

as this fixes a problem which makes an app with this SDK unusable when joining a specific room, I would mark this as high priority!

@krille-chan krille-chan self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant