Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Slow send and receive (still)

Open MaximosPr opened this issue 1 year ago • 24 comments

Hey guys I've opened the same issue in tha past (https://github.com/signalapp/Signal-Android/issues/13134#issue-1869155712) where I reported really slow send and receive (probably) due to the large database me and my partner have created chatting. So I'm asking: is there a way to store my data in a home server I've made and retrieve data from there instead of loading the app's database? Every idea welcome! (Sorry for bad English).

MaximosPr avatar Feb 02 '24 12:02 MaximosPr

I have the same issue. I also have a large database.

lgehr avatar Feb 03 '24 12:02 lgehr

Hi @MaximosPr, from my preliminary understanding, the speed depends not only on the hosts' server( not your server so it probably won't help to install a server at your end, the Signal-Android's hosting server) but also the speed of telecommunication services like AWS, GCP or whatever provider Signal uses. I was trying to find out which database they used but in vain. And there'd be other possible issues I didn't spot.

thstasy avatar Feb 03 '24 14:02 thstasy

@thstasy I came to the database conclusion because when I'm using my computer to chat (where I have ages to sync so my database is probably insanely small) I get no lag.

MaximosPr avatar Feb 03 '24 14:02 MaximosPr

Hi, would you mind submitting a new debuglog? The old debug log had to be purged as per our policy and I'd like to take another look this.

nicholas-signal avatar Feb 05 '24 16:02 nicholas-signal

Here you go: https://debuglogs.org/android/6.44.3/fa32ee8321ee2bcb8bd69dadf590d74aeb3b6c5d05eb8295c10c06910d9fb4ad

MaximosPr avatar Feb 05 '24 19:02 MaximosPr

can confirm i have the same issue; a new, short convo is instant, a long old convo takes very long and creating a new group chat with the same person makes it instant again.

maze42d avatar Feb 15 '24 22:02 maze42d

@maze42d a debuglog from you as well would be helpful please and thank you

cody-signal avatar Feb 16 '24 00:02 cody-signal

https://debuglogs.org/android/6.47.4/48fc8a340dc3ffb3c9f2e7c110855ccaa215f5d80ecdeaa2b28e03913fe5167f sorry about the late response.

maze42d avatar Feb 18 '24 17:02 maze42d

also just to note, happens in the same conversations on ios as well, exactly the same behavior

maze42d avatar Feb 21 '24 15:02 maze42d

Wanted to clarify how signal works: the server only stores encrypted copies of your messages until your device downloads them. Then they're gone. Your device, whether on android/ios/desktop, stores all of your messages locally. There is no way to offload that work.

That said, we've found instances in the past where SQLite chooses sub-optimal indices for some queries based on an individual's usage pattern. This is a SQLite thing, not a Signal thing. I actually just found one that started to affect my message sending perf, turning a 1ms query into a 400ms query. I've addressed this in 7.1

It could very well be that people here were affected by the same query, so let us know if things get better in 7.1. Otherwise, we'll continue to be on the lookout for similar situations.

greyson-signal avatar Mar 07 '24 19:03 greyson-signal

Thanks for the input @greyson-signal, we'll wait and report back.

MaximosPr avatar Mar 08 '24 09:03 MaximosPr

Tested with version 7.1.1, still slow sending of messages.

Database size is 3gb.

Below is the debug, https://debuglogs.org/android/7.1.1/bcd4af91b4750ea4b63347e5487202976699509fd8fc0d425718f3a06673be66

mrliuws avatar Mar 11 '24 06:03 mrliuws

Still getting this on 7.4.2.

Debug logs: https://debuglogs.org/android/7.4.2/13057e8821fd7d3f992e9aa66d1d9f31c58ea4562054acd7e9b2b8b299288448

SilverMight avatar Apr 27 '24 00:04 SilverMight

Im also experiencing the same problem. Messages take 30s to 2min to get delivered. Creating a new group chat instantly made things faster.

My old chat is huge, but ideally this should scale better.

I dont think I fully understand this issue though. How can old stored messages slow down the delivery of new messages?

At least intuitively it seems like sending a brand new message should be a constant time operation (assuming an ideal network). I can't think of a reason why it wouldnt be that way.

JulioCabria avatar May 12 '24 09:05 JulioCabria

Just wanted to update, time taken to send messages seems to be fixed in v7 7.1. Sending messages for large group chat is decent now.

Thanks 👍

mrliuws avatar May 12 '24 15:05 mrliuws

Im replying just to confirm that Im still experiencing the issue in Signal Android 7.6.2

In my case its for direct messages with my partner. We have a long chat history and messages take from 30s to several minutes to get delivered. Creating an empty group chat makes messages instant again.

Julynx avatar May 12 '24 17:05 Julynx

Having same issue on 7.6.2. DB is about 7GB. Unfortunately, I cannot provide debug log since it is in a forever-loading state :(

ImJustToNy avatar May 25 '24 11:05 ImJustToNy

After updating to 7.7.2 everything is fast once again. Thank you guys!

SilverMight avatar May 30 '24 03:05 SilverMight

Still getting this on 7.10.3

here is the debug log: https://debuglogs.org/android/7.10.3/22166dae41afd4de667d748b6e457e490d130076187fed04176094eaf2d673bc

Note to self is instantaneous, even between devices. Don't know if they work like work like normal messages as mentioned before, so sorry if this information is irrelevant.

xDIMOx avatar Jul 09 '24 17:07 xDIMOx

@xDIMOx is this send or receive or both? Your logs only show one send attempt that took <400ms. I also see various network connectivity issues in your logs that could impact receive.

cody-signal avatar Jul 10 '24 16:07 cody-signal

@cody-signal My fault, my delay was sending a message in the desktop app and the message taking a long time to be received (>20 min). Sorry for wasting your time. I will contact the correct project.

xDIMOx avatar Jul 10 '24 17:07 xDIMOx

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 11 '24 11:09 stale[bot]

Reopen please, still occur.

ImJustToNy avatar Sep 11 '24 12:09 ImJustToNy

We've made multiple changes around send and receive, for those still regularly encountering the issue, a fresh debuglog from the latest version available to you is super helpful.

cody-signal avatar Sep 11 '24 14:09 cody-signal

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 11 '25 02:01 stale[bot]

This issue has been closed due to inactivity.

stale[bot] avatar Feb 07 '25 18:02 stale[bot]

reopen please, still happening on latest version

Ver 7.42.2, logs: https://debuglogs.org/android/7.42.2/f2bc615acc804cb20e61dbdf5247dbb60421fe9f7d4aa3436588b813e9c6909f

jaymehta-g avatar Jun 01 '25 02:06 jaymehta-g

Should add that unlike others with this issue, I get the issue in note to self as well as in group chats. Messages sometimes go through immediately and sometimes take anywhere from 5 to 30 minutes to go through, but they always eventually suceed and never load forever.

jaymehta-g avatar Jun 01 '25 02:06 jaymehta-g

Same problem here with iOS iOS 18.5 Signal 7.64

My database is now 11,17GB big. One, one to one chat, is used the most. The messages delay is around 15 seconds, when I'm sending a message. If the sent symbol isn't shown, I have to wait inside the chat, the message will not be sent in the background and only received when I'm inside the chat again even 15 minutes later. This is really annoying, because I don't want to delete all my messages. Even receiving messages from the other side takes up a long time for me. And as it seems making a new group chat for two persons as a workaround doesn't seem logical. Because some people said, the a new group chat is solving the issue. The question is, is it a problem with sqlite and how data is stored (messages and files) and that maybe sqlite isn't the right database to use or is it something else.

Schnuppi12 avatar Jun 25 '25 06:06 Schnuppi12