Closed yulman19 closed 3 years ago
This is a long-running performance issue with no clear fix.
Is there a workaround, like clearing the db?
You can try deleting some of the message history.
@michaelkourlas Can we discuss the technical problems behind why this is a difficult issue to fix? I really appreciate this software you've put together and would love to help debug if I can.
It feels like an issue with synchronization, like the app is requesting all messages in the history of that contact, since the slowdown gets worse the more messages there are for that particular contact.
Yes, that's the problem. I'm sure there's a way to fix it by retrieving only part of the message history at a time, and retrieving more automatically as the user scrolls up. I just haven't done the research required to figure out how to make that work with Android's RecyclerView.
A workaround currently is to set the synchronization date to some recent date, and then drop the local database.
There are currently no tools to automate this, I've opened #226 as a suggestion.
Yes, that's the problem. I'm sure there's a way to fix it by retrieving only part of the message history at a time, and retrieving more automatically as the user scrolls up.
I'm confused as to why VoIP.ms API needs to be contacted to refresh the messages list when sending a message, can you not just append the message on successful response, and not synchronize?
By "requesting all messages in the history of that contact", I understood you to be referring to requesting all the messages from the local database. That's what the app does when it loads a contact -- it doesn't go and fetch them from VoIP.ms every time.
In addition, the app doesn't go and retrieve messages from VoIP.ms every time a message is sent either, so I'm not sure what you're referring to.
Right, my mistake. So the app retrieves the message history from the local database. 👍
It seems to do this on message send as well, because if the message history is very long, the app will retry sending the message multiple times, until the message history is updated.
What I was referring to was the UX flow for sending a message seems to trigger a refresh of the message list. However is this necessary? I assumed (perhaps erroneously) that you could just append the message sent to the UI, without having to refresh the message list.
I assumed (perhaps erroneously) that you could just append the message sent to the UI, without having to refresh the message list.
I'm not sure this is possible, but in any event I believe the core issue is that we load more messages than can be displayed anyway.
The app now only loads 100 messages initially, loading more as you scroll up.
Thanks @michaelkourlas, I really appreciate your hard work 🙂
Whenever I have a contact that I have a big message history with, the app becomes slow or unresponsive