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

Indexeddb performances when trying to get inboundsession that needs to be backedup #2877

Closed
BillCarsonFr opened this issue Nov 23, 2023 · 1 comment · Fixed by #2885
Closed
Assignees

Comments

@BillCarsonFr
Copy link
Member

Currently in order to get the inbound_group_session that needs to be backed up you need to load all entries in the db, then you have to decrypt all of them to check for the backed_up bool

If you compare to sqllite store, there is an indexed column for backed_up for quick access

@BillCarsonFr
Copy link
Member Author

@richvdh richvdh self-assigned this Nov 23, 2023
bnjbvr pushed a commit that referenced this issue Nov 30, 2023
Currently, querying for inbound group sessions which need backing up is very
inefficient: we have to search through the whole list.

Here, we change the way they are stored so that we can maintain an index of the
ones that need a backup.

Fixes: element-hq/element-web#26488
Fixes: #2877

---

* indexeddb: Update storage for inbound_group_sessions

Currently, querying for inbound group sessions which need backing up is very
inefficient: we have to search through the whole list.

Here, we change the way they are stored so that we can maintain an index of the
ones that need a backup.

* Rename functions for clarity

* Remove spurious log line

This was a bit verbose

* Rename constants for i_g_s store names

* improve log messages

* add a warning

* Rename `InboundGroupSessionIndexedDbObject.data`

* formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants