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

We've lost offline support, and no longer cache the roomlist, so roomlist search doesn't work until AllRooms has reloaded. #937

Closed
ara4n opened this issue May 22, 2023 · 3 comments
Labels
A-Offline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@ara4n
Copy link
Member

ara4n commented May 22, 2023

Steps to reproduce

  1. Launch the app on bad/missing connectivity
  2. Observe that the you see the shimmering empty roomlist rather than a usable room list.
  3. Once the roomlist loads, observe that roomlist search doesn't work (until AllRooms has eventually paginated in all your rooms again, which could take tens of seconds on a large account - which is a problem, given immediately searching the room list on launching the app is a very common use case).
    • (a separate problem is that the roomlist search gives you no UI feedback to warn you it's incomplete while allrooms is populating)

This is because we backed out the cold cache in abc86b7 given its performance with sqlite was particularly bad (as per #876).

However, we do need a cold cache of some kind so that offline support works, and so app launch isn't bottlenecked on talking to the server, which should be much slower than simply loading some data from local disk. A better cold cache would presumably:

  • Be paginated, so access is O(1) with number of rooms, so the roomlist UI code will pull only the required page of rooms from cache needed to display the current visible rooms
  • Cache data precomputed for display in the roomlist (e.g. the current room preview, rather than figuring it out from scratch)
  • Only precache room history for these rooms on demand.

If it was me doing it, I'd be tempted to use the same API for SS as for the cache rather than having two different pagination/precaching mechanisms flying around - given the problem of "how do you efficiently load data O(1) from the server" is almost identical to the problem of "how do you efficiently load data O(1) from a local cache".

Outcome

What did you expect?

Offline support and reliable roomlist search.

What happened instead?

No offline support, and roomlist search isn't reliable until allrooms has loaded.

Your phone model

No response

Operating system version

No response

Application version

nightly 221

Homeserver

matrix.org

Will you send logs?

No

@ara4n ara4n added the T-Defect label May 22, 2023
@kittykat kittykat added Z-Schedule A-Offline S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Jul 5, 2023
@ara4n
Copy link
Member Author

ara4n commented Jul 8, 2023

see also #1203

@manuroe manuroe removed their assignment Jul 11, 2023
@stefanceriu
Copy link
Member

Will be part of the next SDK release as per matrix-org/matrix-rust-sdk#2386

@Hywan
Copy link
Member

Hywan commented Aug 10, 2023

Closed by #1469.

@Hywan Hywan closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Offline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

6 participants