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

UI frequently freezes for a few seconds when continuously listening to conversations #27

Closed
nileshrathore opened this issue Dec 30, 2022 · 3 comments
Assignees
Labels
bug Something isn't working P2 Priority 2

Comments

@nileshrathore
Copy link

I have noticed that the app's UI frequently freezes for a few seconds when I am continuously listening to conversations and messages. This issue seems to occur more frequently when I have a large number of conversations, such as 45-50, in my conversation list. Is there any way to resolve this issue?

ps: I'm using DB architecture same as used in the example app.

@dmccartney
Copy link
Contributor

I suspect this has to do with the DB/hooks layers if you lifted them from the example app.

I'm not sure if your app uses/will use the DB for other stuff -- and it could be platform specific -- but one fix might be to move the DB into a background isolate: https://drift.simonbinder.eu/docs/advanced-features/isolates/

Depending on your app's drift DB setup, this is sometimes as simple as changing
NativeDatabase(...) -> NativeDatabase.createInBackground(...)

@nileshrathore
Copy link
Author

Thank you for your help. Running the database in the background resolved most of the issues. However, I have noticed that the UI still occasionally freezes, especially after this log: xmtp: <-- #004 /xmtp.message_api.v1.MessageApi/Query. I believe this is a remote query. Are all remote calls also running in a background thread?"

@nplasterer nplasterer added the bug Something isn't working label Feb 13, 2023
@nplasterer nplasterer added the P2 Priority 2 label Feb 15, 2023
@dmccartney
Copy link
Contributor

It sounds like this was partially resolved and the remaining bits are being addressed with more targeted issues as they're identified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Priority 2
Projects
None yet
Development

No branches or pull requests

3 participants