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

Lazy load room messages from the cache #4382

Closed
manuroe opened this issue Jun 3, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-sdk#1206
Closed

Lazy load room messages from the cache #4382

manuroe opened this issue Jun 3, 2021 · 0 comments · Fixed by matrix-org/matrix-ios-sdk#1206

Comments

@manuroe
Copy link
Member

manuroe commented Jun 3, 2021

As we did in the SDK for room states when we introduced lazy loaded, we should be able to load messages from the store only when needed, ie:

  • when the user opens the room and paginates in the timeline
  • when we are getting more messages from /sync and we need to store them.

As everything should be already asynchronous, there should not be any api break.

We want to kill the 828ms in this log:

[MXFileStore] Start data loading from files
[MXFileStore] Loaded room messages of 625 rooms in 828ms
[MXFileStore] Loaded rooms summaries data of 625 rooms in 572ms
[MXFileStore] Loaded rooms account data of 625 rooms in 359ms
[MXFileStore] Loaded read receipts of 625 rooms in 1035ms
[MXFileStore] Loaded 2164 MXUsers in 71ms
[MXFileStore] Loaded 2 MXGroups in 1ms
[MXBaseProfiler] Task startup - storePreload for 625 units completed in 2870.760ms
[MXFileStore] Data loaded from files in 2871ms

Note this time is continuously growing with the amount of messages received and cached.

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