[X] 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.
Preflight Checklist
Describe your problem
Currently we store room states by a
roomID|type
key and then store a Map ofstate_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