signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.58k stars 6.13k forks source link

Signal gets really slow on long Conversations #9930

Closed Anti-ctrl closed 3 years ago

Anti-ctrl commented 4 years ago

Bug description

If I have a long Chat with someone, probably multiple thousand Messages and Media in History, then the Chat gets REALLY slow. We talking about 40-50 sec for one Message to get send and it only gets slower. If you send multiple Messages after the first one, it can take up to multiple Minutes till they get send. Receiving Messages takes ~10-15 sec. Short Chats dont seem to be affected. Its the most brutal if the other Person is writing/answering at the same time as your Message sends. Signal gets really laggy, the phone gets hot and slow, till anything is sent. Not related to this, but maybe Interesting: Backups take around 3 hours to finish. Backupfile is around 7GB in Size.

Steps to reproduce

Actual result: Messages take sometimes Minutes to Send. Expected result: Messages should be send almost instant, like in a fresh Chat.

Device info

Device: Galaxy S5 klte / SM-G900F and One Plus 6T Android version: 9.0 LineageOS 16 / Stock Rom Signal version: 4.68.8, persists in 4.69.6, persists in 4.70.3, persists in 4.70.5, persists in 5.8.10, solved in 5.20.4

Link to debug log

https://debuglogs.org/fff230b9173168bd607d678f019b51b7dc38c12ced3661f169c51e1968b147d8

EDIT: New Log, while sending and receiving Messages at the same time:

https://debuglogs.org/7eead199b7af5be480058d38b128f766cf4536beb0be0b4a24aa2ad962aada09

EDIT2: Now (28th Aug) the Problem is so bad, that the App gets nearly unusable. Messages take around 90 Seconds to get send. Only in that one, long Chat. As long as one Message in that Chat is sending, anything else is almost not responding and the App locks up sometimes. Even receiving Messages in that Chat is so slow, that sometimes the Person thinks i lost connection or turned off my Phone. Isnt there anything that can be done, without loosing all the History ? I used Whatsapp for some time before and had Chats with around 30-40k Messages and NEVER had any Problems like that, why is it, that Signal has such poor Performance ?

EDIT3 (4th Nov): Time to send one Message went up to ~130 secs. Pics dont always send. Just the Text under them. App is barely usable whenever i access a long Chat.

EDIT4 (Feb 2021): Changed Phone from a Galaxy S5 with Snapdragon 801 and 2GB RAM, to a One Plus 6T with Snapdragon 845 and 8GB RAM. Problem still persists, but is better thanks to more Raw Power. Chat still gets slower every Day, even tho not as noticeable anymore, probably also thanks to more power.

EDIT5 (18th Aug 2021): Problem seems resolved. Performance in a long Chat is drastically Improved with Version 5.20.4. A Message takes around 2-3 seconds now, which i consider "instant". Good Job Guys and Girls!

Probably Related

9881

Nisc3d commented 4 years ago

I originally planned my own Bug report for this, but I think it fits here really well. I hope a dev can help here and get behind this issue, because I think Signal really has a performance Problem on some devices.

I have a friend, that complains frequently about Signal being slow to send her messages. In a Group Chat it takes about 15 seconds for one message to send, sometimes up to one minute. Also media messages take a long time to download. Recieving messages is slow as well. When I send a message in the Group Chat with her, I notice that it takes several seconds until she receives the message, where other members receive them almost instantly. In one to one conversations it is a bit better, but still noticeable. She also tried it over mobile data and different WiFi networks, so it shouldn't be a network Problem on her end. Note: she has about 5 GB of stored Data in Signal.

Device: Nokia 6 Android Version: 9 Signal Version: 4.68.8

Debug Log: https://debuglogs.org/7838b66ab1607c0c8e9abaa93ec6b462cc1319dc5aa65f7d5effafb94c7ca8a7 Note: The Debug Log was captured after messaging in a group at first and then a few messages in a one to one chat.

Anti-ctrl commented 4 years ago

I originally planned my own Bug report for this, but I think it fits here really well. I hope a dev can help here and get behind this issue, because I think Signal really has a performance Problem on some devices.

I have a friend, that complains frequently about Signal being slow to send her messages. In a Group Chat it takes about 15 seconds for one message to send, sometimes up to one minute. Also media messages take a long time to download. Recieving messages is slow as well. When I send a message in the Group Chat with her, I notice that it takes several seconds until she receives the message, where other members receive them almost instantly. In one to one conversations it is a bit better, but still noticeable. She also tried it over mobile data and different WiFi networks, so it shouldn't be a network Problem on her end. Note: she has about 5 GB of stored Data in Signal.

Device: Nokia 6 Android Version: 9 Signal Version: 4.68.8

Debug Log: https://debuglogs.org/7838b66ab1607c0c8e9abaa93ec6b462cc1319dc5aa65f7d5effafb94c7ca8a7 Note: The Debug Log was captured after messaging in a group at first and then a few messages in a one to one chat.

Great to see, that I´m not alone. For a Messenger both phones should´ve plenty of Power. I have a guess what it might be, even tho I´m probably wrong with that. At least the Snapdragon 801 in my Phone doesnt support AES Encryption in Hardware. Couldnt find anything about the Snapdragon 430 in the Nokia 6. I know Signal Protocol uses ChaCha20 for Encryption, but doesnt that benefit from Hardware Encryption too?

It took me around 6 Month till i opened this Bugreport, because i thought it might get fixed in some Updates and in Fact, this is my first Bug Report ever, so i hope i do anything right.

My Log File was taken, after i sent a Message to a Contact, which i wasnt actively writing with, but where the Problem is the biggest. I experience the same issues you are talking about, but yours is better explained. In my Group Chat it really helps, if i Delete all Media from the Chat. Messages still take a long time, but not as long. IDK I really hope someone can help with that, as I´m a total noob in Programming or even Debugging.

richardddd98 commented 4 years ago

This bug might be a duplicate of #9881. I have this same issue, but I don't get to 50 seconds, but up to 15 seconds on the following devices (and specific chats of course):

Huawei Honor 9 Huawei P40 Lite 5G Xiaomi Mi A1 Samsung Galaxy S8

Sending lots of voice notes while the other is sending their own voice notes makes all this really terrible, messages lag behind and you have to wait for Signal to send them. At least 2 of these 4 devices have AES hardware acceleration, it might help to not arrive to 50 seconds but definitely the problem persists.

A friend of mine fixed this by setting a limit of 5000 messages per conversation, while I didn't. His chat is quick now, mine is not, since I did not apply the limit. With another friend of mine, we have been creating a group each month with only me and her inside, so the chat history never gets too long.

Signal needs this to be fixed as soon as possible. Please focus on this before adding new features, many users are not patient and are leaving.

Anti-ctrl commented 4 years ago

Quick Update: I think since 4.69.6 my Backup time is drastically reduced. Takes ~25-35 Minutes to complete the Full 7-8GB Backup, instead of ~3 hours. My Battery says "thank you". The Rest of the Problems still persist and get worse every Day. Its now at a Point where you can really feel and see how much slower Signal gets with every extra day. I send Messages from my PC now, because on my Phone its anything but "Realtime". If that continuous i see myself forced to switch to something else, as it not only not pleasant, but annoying at this point.

I really hope someone can fix this, as I dont have the Skills todo it myself unfortunately.

haffenloher commented 4 years ago

I have one of these really long one-to-one conversations as well and it's getting worse. My main issue is that after pressing send, I have to leave Signal in the foreground for the ~13 seconds it currently takes to send a message in that particular chat or the message will never send. If I put Signal in the background while a message is still sending, it will remain in the 'pending' state indefinitely (I guess the send job takes too long and gets killed by the OS?). If I reply to multiple things in quick succession, this can easily mean having to wait 50-60 seconds before I can do anything else on my phone.

Anti-ctrl commented 4 years ago

I have one of these really long one-to-one conversations as well and it's getting worse. My main issue is that after pressing send, I have to leave Signal in the foreground for the ~13 seconds it currently takes to send a message in that particular chat or the message will never send. If I put Signal in the background while a message is still sending, it will remain in the 'pending' state indefinitely (I guess the send job takes too long and gets killed by the OS?). If I reply to multiple things in quick succession, this can easily mean having to wait 50-60 seconds before I can do anything else on my phone.

Not as bad for me, at least on txt msg. Pictures need to "show up" before i can leave it on sending in the Background, but if i switch immediately to another app, i recognize the same behaivior, but not every time. My Problem is just, that it takes around 30 sec to send one message and if u add another one in the sending process it takes easily 90 seconds for ONE message to get send. Rest one will follow after that in 30 or so sec steps. Quickly adds up to minutes of just waiting and while my txt partner can write messages, he/she often gets confused because my answers, which are way too late, make no sense at all.

Wasseranomalie commented 4 years ago

I also have the same problem as described by @haffenloher. Sometimes messages will not be sent at all if the app is put to the background too quickly after sending inside chats with a long message history (which also takes quite long if it works).

Debug log: https://debuglogs.org/c7581cd3e032893312d3b7a8ea3fa02dbb086ab265b07febd91a409d8d3922bf The last time it happened around 2020-09-01 15:22:51

cody-signal commented 4 years ago

Thank you all for your debug logs and information. We are aware of the issue and unfortunately there isn't a quick fix we can just knock out for y'all. We're hoping to dedicate some serious time to performance improvements in the very near future. This probably isn't the news you wanted to read, but we hear you, we are aware of it, and we want to fix it, it's just going to take a little time on our end.

Anti-ctrl commented 4 years ago

Thank you all for your debug logs and information. We are aware of the issue and unfortunately there isn't a quick fix we can just knock out for y'all. We're hoping to dedicate some serious time to performance improvements in the very near future. This probably isn't the news you wanted to read, but we hear you, we are aware of it, and we want to fix it, it's just going to take a little time on our end.

Thanks for your reply on that topic. I mean, its surely not what most of us wanna hear, thats right, but at least its something and we can hope that there might be a possible fix in the near future. I would guess, that most of us are patient enough to wait just a bit longer, even tho the experience is really unpleasant atm. Best of Luck for that Process and thanks for the Service :)

Anti-ctrl commented 3 years ago

Thank you all for your debug logs and information. We are aware of the issue and unfortunately there isn't a quick fix we can just knock out for y'all. We're hoping to dedicate some serious time to performance improvements in the very near future. This probably isn't the news you wanted to read, but we hear you, we are aware of it, and we want to fix it, it's just going to take a little time on our end.

Is there any Update regarding that Topic ? Performance is so bad that ppl are now pissed enough to just not use Signal anymore. Instead of providing useless new Features which slow down Signal even more, just fix that damn thing first. Even on a Pocophone F1, which isnt that slow, Signal just eats all Resources for a few seconds till messages are sent. In a really long Chat (90k Messages), that can take around 20-30 secs. With my S5 I´m now at over 2 Minutes for sending ONE freaking Message. Pictures also dont send every time. There is just the Text i provided with the Picture. Guys please. Finally do something!

greyson-signal commented 3 years ago

@Anti-ctrl Hi there, I know you're frustrated, but unfortunately there aren't any simple remedies here. Improving performance in this area involves making some large fundamental changes, which takes time. New debuglogs are always useful though.

Anti-ctrl commented 3 years ago

@Anti-ctrl Hi there, I know you're frustrated, but unfortunately there aren't any simple remedies here. Improving performance in this area involves making some large fundamental changes, which takes time. New debuglogs are always useful though.

I understand that it takes time, but has anyone even started to do anything about that poor performance, or are there still coming new features, before anything is done ? I will Edit this and Post another Debuglog as soon as i can. Thanks for the reply.

EDIT: Here is another Debuglog. Took it while chatting and waiting for sending on multiple messages in one Chat. https://debuglogs.org/ca7016c395055c668da82c495a969a993dfba8f5d2d641d48d5bf1a5ea8df86d

Hope it helps somewhat.

@Anti-ctrl Doing investigations around performance and starting improvements is something I'm working on. I know as someone on the outside who is having a specific problem, it can be frustrating when you feel the team is prioritizing things that aren't your problem. And believe me when I say I understand that it's a bad problem. However, I assure you that there are many people with many different problems, and as a team we have to make hard decisions all the time about what we want to work on at that moment. I wanna fix this, it's just gonna take some work 👍

And yes its really annoying, sorry for my rant, its just really frustrating. Thanks for the effort, good luck fixing it. Will donate 1 or 10 coffee´s next month to speed things up.

greyson-signal commented 3 years ago

@Anti-ctrl Doing investigations around performance and starting improvements is something I'm working on. I know as someone on the outside who is having a specific problem, it can be frustrating when you feel the team is prioritizing things that aren't your problem. And believe me when I say I understand that it's a bad problem. However, I assure you that there are many people with many different problems, and as a team we have to make hard decisions all the time about what we want to work on at that moment. I wanna fix this, it's just gonna take some work :+1:

richardddd98 commented 3 years ago

Unfortunately I am frustrated too about this issue, it's a total disaster. While using Signal and typing in some long chats and having to wait tens of seconds for messages to be sent in a 2020 smartphone, I really become willing to say some nice words here on this issue, but then I refrain :D

Anyway it seems you're using zetetic database, did you have a look at this page related to performance issues? https://discuss.zetetic.net/t/sqlcipher-performance-optimization/14

@greyson-signal

I know I'm just an user, but I strongly recommend you stop adding new features and pay more attention to the issues. They are more than 700 and are growing. This is a bad sign unfortunately. I know fixing bugs is absolutely not funny, but especially this one should have an upmost importance. I have seen projects fail due to many features which introduced bugs, some projects became so buggy they have been abandoned. It's much more dangerous than what it might seem, unfortunately.

Anyway...

Do you have any idea about where the bottleneck might be? I think, it's so slow it should be enough to just populate a database with lots of messages, trying to send one and then stopping the threads and reading the stack trace to see where they are statistically spending most of the time. It should be as easy as it seems to find the bottleneck. It's so slow that you shouldn't even need proper tools to find the bottleneck.

Where do Signal threads hang? Inside your code or inside zatetic db code?

ASHuenchuleo commented 3 years ago

This is happening to me too on a samsumg s9 with android 10. Just after a few days of conversation, the chat gets noticeably slower and the keyboard starts lagging, but not as bad as the OP. While I don't know much about the internals of the app, maybe you can only load the messages when the chat scrolls back? Instead of loading everything at once when the chat is opened. This sounds hard to do though.

greyson-signal commented 3 years ago

@richardddd98 Believe me, if I could create these performance problems on any device I have access to, I would be working on them. They seem to crop up in specific situations that I can't reproduce. Or, they happen incredibly sporadically and then never again. As such, most of my efforts have gone into adding diagnostics. In terms of testing on devices with a lot of messages, my personal install is something like 10.5 GB. I know that when an issue is happening to you, it's easy to assume it's happening to everybody. But to the best of my knowledge, it isn't. The most helpful thing you can provide is a debuglog.

@ASHuenchuleo

maybe you can only load the messages when the chat scrolls back?

Yep, we already do this.

I-Al-Istannen commented 3 years ago

@greyson-signal

(Using commit 40338afe7a5c10a6a57483dc5f46050a0d482af0)

I am not sure if I can help, but my Signal is also really slow (as you can see in the issues I opened). I tried this:

  1. Find out in the profiler and log messages that signal spends ~2 seconds per batch message lookup in slow conversations and just <200ms in alright ones
  2. Debug Signal to get the secret database key
  3. Copy the database to my laptop
  4. Run the query on my laptop on the database (~30MB) and find out it still takes 1.8 seconds on a quite modern laptop:
    Execution completed without errors
    Result: 25 rows returned in 1825ms
    In line 1:
    SELECT _id,
         unique_row_id,
         BODY,

    With a where clause of

    LEFT OUTER JOIN part ON part.mid = mms._id
    WHERE (thread_id = 9)
    GROUP BY mms._id
    ORDER BY date_received DESC
    LIMIT 75,
         25)

The query in question was the queryTables in MmsSmsDatabase, called by getConversation in ConversationDataSource::loadInitial.

If I remove the ORDER BY date_received DESC it completes in ~45ms. It also no longer creates a temporary B-tree for the date ordering and changes some other stuff. If I remove the GROUP BY mms._id (which has no effect on my query, but probably is there for a reason), it completes in ~300ms - and changes the query plan only slightly:

Existing query:

2   0   0   CO-ROUTINE 2
9   2   0   MERGE (UNION ALL)
11  9   0   LEFT
16  11  0   SEARCH TABLE sms USING INDEX sms_thread_date_index (thread_id=?)
77  9   0   RIGHT
88  77  0   SEARCH TABLE mms USING INDEX mms_thread_id_index (thread_id=?)
93  77  0   SEARCH TABLE part USING INDEX part_mms_id_index (mid=?)
220 77  0   USE TEMP B-TREE FOR DISTINCT
221 77  0   USE TEMP B-TREE FOR ORDER BY
301 0   0   SCAN SUBQUERY 2

Deleting the group by

2   0   0   CO-ROUTINE 2
9   2   0   MERGE (UNION ALL)
11  9   0   LEFT
16  11  0   SEARCH TABLE sms USING INDEX sms_thread_date_index (thread_id=?)
77  9   0   RIGHT
86  77  0   SEARCH TABLE mms USING INDEX mms_thread_date_index (thread_id=?)
91  77  0   SEARCH TABLE part USING INDEX part_mms_id_index (mid=?)
192 77  0   USE TEMP B-TREE FOR DISTINCT
222 0   0   SCAN SUBQUERY 2

As you can see it is now able to leverage the mms_thread_date_index for this query and no longer needs a temporary B-tree.

No idea if that should take that long or whether this post is helpful or just random noise, but maybe it serves as another data point.

Nisc3d commented 3 years ago

@zyklon-b can you post a debug log from your phone? That could really help.

Nisc3d commented 3 years ago

@greyson-signal I have another debug log for you: https://debuglogs.org/85dad199e51250243afdaf0bad07c9baac8ac456c60b52d5e6bcb593659e03cf

At first I sent many messages to a group that is slow for a member in the group. Then I sent more, while Signal was in the background for them. And finally the member of the group sent about 20 messages.

Signal has been really slow for them, and we had to create a new group, because the old one became to slow. We don't want to create new groups every time there are too many messages in it. I hope this issue can be fixed eventually.

If we should test something and provide more debug logs we are happy to help.

TheRealCrusher commented 3 years ago

I seem to have had a similar phenomenon, for the first time today, and totally unexpected, on my Xiaomi Redmi Note 8 Pro.

When switching to Signal it showed a black app screen with rudimentary UI elements and started to fill up only after several seconds, finishing in the background only while I found this issue.

I also have a largish database of currently about 10.1 GiB. About 90 percent of total messages should be in maybe five conversations, with the rest being in another hundred or so conversations

I've posted a debug log here

hwinnemoe commented 3 years ago

I have made the experience that - in a slow conversation - it is faster to send the message and return to the conversation list than to wait for the message to be sent while keeping the slow conversation open.

Wheest commented 3 years ago

Experiencing this issue on Android. Message sending latency is often very high for myself and the counterparty, order of seconds sometimes over a minute. Latency is significantly reduced if I am using the desktop app.

Signal install on Android is around 6.7GB.

When message latency is particularly high, I notice an increased frequency of other bugs, e.g. the conversation list is randomised with various contacts, though if I click on any of them it takes me to the "true" conversation (given ordering by most recent message).

I've posted a debug log here.

luanluta commented 3 years ago

Reposting from original post (with some corrections and additional info:

_Messages take 1 to 3 minutes to send. Which makes having a live, ongoing chat very difficult and annoying.

The issue doesn't seem to be an Internet one as this happens no matter what network both users are.

Been using Signal as a main chat app for the past year, and was hoping this issue would get fixed but it still hasnt.

I have a Samaung A70 running Android 10 (OneUI 2.5)_

I tried chatting with a fresh chat ( a user i do not have much chat history with) and it works fine. This only happens with long ongoing chats. Here is a debug log after sending multiple messages to test it:

https://debuglogs.org/8c592bc11a199552bbae34b76a957fa5ad64971db5db09b0299494221df5a28a

Salmon-Bard commented 3 years ago

A solution to this issue maybe in avoiding overloading main chat container UI component via offloading chats content to preloader file based cache for fast queryless retrieval when scrolling the chat window up and down over visible realstate of the app UI.

Edit: After one month of using signal for chatting with Friends and also for business contacts we all notice one issue regardless of Android devices generation and power

One real issue that causes UI lagging from my prospective as a developer is that there is a large number of heavy transitions and style effects applied to UI elements that makes the app require huge processing resource to render on the hardware.

My recommendation is to PLEASE Keep it light, simple and fast like in Marital and paper design patterns, no more shadows and transitions that kills ram and CPU when dealing with large number of elements in a long chat conversation.

Anti-ctrl commented 3 years ago

So, after almost half a year, there changed nothing. Great! Glad i didnt donate for the time being. With all the new Users coming to Signal, thanks to Elon, its only a matter of time, till people will realize that Signal gets really slow and they will quit again and switch back to Whatsapp, as the Drama about them will be forgotten at some point. Thats not how Signal can bring Privacy to everyone.

Enough rant. I changed my Phone to a One Plus 6T with Snapdragon 845 and 8GB of RAM. 256GB UFS 2.1 Storage and Signal is still slow. The Chat i talked about got obviously bigger and even with my new, faster Phone, Signal is still slow. Really slow compared to anything else. Messages take around 10-15 Seconds to send, sometimes longer with Multiple Messages. So, the same Problem persists, even if its better than before, thanks to more Raw Power. Why is there no one REALLY Working on it? Cant be the case, that this MAJOR Problem is being ignored for almost 6 Month now, but new Features are being added like CO2 to the Atmosphere. This may be the case, why Signal will fail and Devs are just ignoring it. Just think about how many people will take the Time and open a Bug report for this. Not even 1 Percent will do it, they will just quit the App, if it gets annoying and Switch to Telegram, Whatsapp, Threema, Wire, or some other Alternative. That one "costumer" is lost probably forever, because the most basic thing isnt working. Writing Messages.

EDIT: New Debuglog from new Phone. Taken After/While Sending Messages: https://debuglogs.org/0e367c07fe4fbcf078ec544da2651e04af92caa52a9c0cc2156c5b41b3aff1af

richardddd98 commented 3 years ago

@Anti-ctrl I really understand how you feel. The fact is Signal has a lot of bugs. A lot means a lot.

A lot means that 1) if I encode a video with ffmpeg H265 and then share with Signal and try to trim it, it will not trim in my conversation, but a text only (eventually empty) message will be sent to the other party. You might wonder: how come such a bug in 2021? 2) when I share a video from TikTok (not the link, the video itself; I first share it with WhatsApp in a group containing only myself to have it as a video, then share it with Signal from WhatsApp), Signal restarts and asks me again to use my fingerprint with about 30% probability. Very very annoying 3) When network connection is unstable, sometimes the application becomes unable to receive, and it sends messages very slowly (it's not the db issue, it's fixed if you disable and enable again your connection)

and other bugs. All of this is very very annoying, I did not take time to report all this issues, as I did not report this one even though I've had it for months (it was actually inconceivable to me that nobody complained about that in Google Play Store reviews and here in GitHub). I just periodically follow these issues and eventually comment when I'm having that particular issue too.

I agree with you. The large majority of the users won't even bother to open an issue here on GitHub. They would just click "Uninstall" and switch to Telegram, WhatsApp or something else instead.

The reality is, Signal has too many issues, and developers don't seem to like fixing all these issues. That's the real problem. They just prefer to add features instead of fixing the bugs. Maybe it's more exciting, I know. In my opinion this is not the best approach, but I can't do much to change their opinion.

Signal has bigger problems than this, unfortunately. I'm saying this as a user who has had this problem for more than 2 years (yes, more than 2 years of this slowness). Don't you believe me when there are more important issues? Have a look at #9432 and #9362. This is a really serious issue. Signal uses absolutely unsafe SHA-1 (collisions found) and RSA 1024 (breaking these signatures is thought to cost some hundred million dollars) to sign its APK. You're literally one bogus HTTPS certificate away from a total disaster. The truth is this can't protect you from mass surveillance. X3DH protocol and double ratchet can't protect you when they fail to securely deliver the APK. This is in the name of compatibility with older devices.

There are other reasons of concern for security, and even though I emailed a question to them, they never answered.

There are people reportedly losing all their conversation history or having difficulties restoring their backups. Have a look at #10751 and #10416.

I can't even call my partner (who uses Xiaomi Mi A1) since there's a terrible eco from the other party.

Open Signal issue list and have a look at them. There are many important issues. Some of them negate the most basic functionalities. So I guess they're giving more priority to them first. At least I hope it.

I'm not sure, but I think Telegram for Android is developed by a single individual, and it has much fewer bugs. On the other hand, Wire has many more bugs than Signal. I don't really know what determines the reliability of these apps. Why Wire is extremely bugged, Signal is moderately bugged and Telegram is almost no bugged at all (but, you know, they forgot to implement a valid e2e encryption mechanism... just "marketing" they say...)

Unfortunately you and I can't do anything apart from opening Android Studio and investigate this bug by ourselves, then try to contribute with fixing code. Since I don't have any intention to do this right now, I just wait for Signal to fix it, and try to hide or delay this issue when it starts to occur to people who recently joined Signal and I'm in contact with. This includes sending fewer messages (i.e. don't separate a laughing emoji from the previous message, writing less messages with more sentences in each, and so on). I know when it becomes obvious to them, it will be really hard for me to calm them down and avoid they switch to something else. There are some people who are relatively patient to these issues, and other ones who suddenly become really angry when something does not work as they expect. Really angry.

You have four choices:

1) Open Android Studio and fix this issue 2) Use groups which you rotate every N months with the people you talk more with (in my case, N is between 1 and 2), and wait for this issue to eventually be solved 3) Switch to something else. Telegram does not have this issue, but their architecture is absolutely the opposite of the "zero-knowledge server" paradigm. But hey, messages are sent quicker. WhatsApp is bad, Wire is extremely bugged (and too much metadata could be collected by their server), Threema is closed source as pointed out by @Nisc3d, Threema is now open source (you might want to try it). What valid choices do you actually have? I don't know about Threema, but maybe the truth is you would exchange this slowness issue with another one. 4) Limit your conversation history length

Putting more pressure on Signal developers can't help I guess. This only frustrates you and them.

Personally, I just accept this compromise. I would rather prefer a stronger APK signature than this issue be solved. You don't notice this issue every day, it's true. But it defeats the purpose of Signal to allow you to communicate securely.

If you want to chat without this issue, you would have to give up something else. I don't suggest you do it. At the end of the day, this is actually a minor issue. But of course the choice is yours and of your contacts

Nisc3d commented 3 years ago

Threema is closed source

Not anymore. Threema is becoming a strong competitor to Signal. Signal must fix these serious bugs to compete.

But to defend the devs a bit: So many new people joining and switching from WhatsApp want more features. If they don't get these features they will also switch away. This is a lose-lose situation. What signal really needs is more developers.

I know there is much frustration with Signal and I experienced it myself already with friends getting very angry at countless bugs. I try my best to report them. I really hope the most serious bugs like this one or the ones you linked can get fixed in the near future.

If a dev is reading this: thank you so much for your development time. I think you also work on weekends sometimes. Please also take time to relax.

richardddd98 commented 3 years ago

Threema is closed source

Not anymore. Threema is becoming a strong competitor to Signal. Signal must fix these serious bugs to compete.

Many thanks for your correction, @Nisc3d. I have updated my comment to reflect this fact. Some minutes ago I actually had a look at their website. I absolutely agree with you, it seems they're really getting better than what I remembered of them.

ProactiveServices commented 3 years ago

Please keep to the forums for off-topic discussions and chat that doesn't contribute to issue reports.

Wheest commented 3 years ago

A test I did with a contact recently was during a lag spike (a period of around an hour where sending messages was taking 20-120 seconds) was to send messages on our main chat (10s of thousands of messages), and send messages to a new group chat containing just us.

I found that messages I sent in the group chat arrived before message send in the main chat, even when the messages the main chat were sent first.

Nisc3d commented 3 years ago

I have another debug log from a reddit user: https://debuglogs.org/3f552231540593931044e38e9a57ff5f8da6b29ee69008e630de23b7546a7aea

The delay is 10 seconds with around 30k messages in the chat. It started about 3-4 weeks ago and the phone is a Huawei p20 lite.

tanker5595 commented 3 years ago

Hi, I'm having the same issue, here's my debug log. https://debuglogs.org/74b576171bb9749bdf5fddb90643d5a51da94b762b168f5efb84ea874c3ee541

niktss commented 3 years ago

New chats are a breeze, old-ish group chat is up to 10 seconds per message. https://debuglogs.org/21d76107a12ed6f5d8e47e7a76dbfffbc61e71113f0d96a93ab11ae2604757aa https://debuglogs.org/7872848a467272680882075bbf11720098545c95e70388b89681772b471fa3a4

grzebo commented 3 years ago

I have the same issue. I assume there's no point in uploading another debug log, since the problem is with the will to fix it and not with the details.

Has anyone found a workaround? Is it enough to delete all the media file from long chats or do you need to purge their entire message history?

Anti-ctrl commented 3 years ago

Has anyone found a workaround? Is it enough to delete all the media file from long chats or do you need to purge their entire message history?

It will not magically remove the Problem, but yes, it helps the situation a bit. If you remove all the Media, the Chat will get more responsive, at least for me. I do that often in a Group Chat, where media is irrelevant to me.

That said: The Chat will still get slower and slower at some point, if you dont start deleting Messages, which is the whole Point of this Issue. It will probably be the End for Signal, if no one takes this serious.

Wheest commented 3 years ago

In the Storage tab, you can sort all media by size, and delete the biggest stuff.

Should be biggest improvement for your efforts, and avoids the scorched Earth approach of deleting everything.

I've not done a scientific test if this has improved stuff, and the issue still impacts me seriously intermittently. Maybe it helped?

But saving that Signal disk space is beneficial anyway, esp for someone on a cheapskate device like me.

ProactiveServices commented 3 years ago

I have the same issue. I assume there's no point in uploading another debug log, since the problem is with the will to fix it and not with the details.

Has anyone found a workaround? Is it enough to delete all the media file from long chats or do you need to purge their entire message history?

In my case I had to backup Signal, erase and reinstall, then restore the backup. Trimming conversations and removing media did not help.

Additional debug logs do help as there are at least two root causes at work with this bug.

hiqua commented 3 years ago

I have the same issue. I assume there's no point in uploading another debug log, since the problem is with the will to fix it and not with the details.

@grzebo please read https://github.com/signalapp/Signal-Android/issues/9930#issuecomment-738478559.

sjlua commented 3 years ago

@richardddd98 Believe me, if I could create these performance problems on any device I have access to, I would be working on them. They seem to crop up in specific situations that I can't reproduce. Or, they happen incredibly sporadically and then never again. As such, most of my efforts have gone into adding diagnostics. In terms of testing on devices with a lot of messages, my personal install is something like 10.5 GB. I know that when an issue is happening to you, it's easy to assume it's happening to everybody. But to the best of my knowledge, it isn't. The most helpful thing you can provide is a debuglog.

@ASHuenchuleo

maybe you can only load the messages when the chat scrolls back?

Yep, we already do this.

https://debuglogs.org/298155eb72d29786076a11af7ff7dd3350cb53e34cca4bdf7d837555d390ae8a

Above is a debug log. I sent a few messages in a group with a ton of chat history and in one that was recently created just to see if this is true.

I could type 4 words in separate messages and once the 4 messages were sent, then the 1st message would start sending

In the clean group, I was in the middle of typing the 2nd message when the first message already sent.

Each message was a word, so not a very long message.

hiqua commented 3 years ago

From this debug log, maybe these lines could be relevant:

[5.5.5] [4370 ] 2021-03-27 19:08:03.258 GMT+11:00 W FixedSizePagingController: onDataNeededAroundIndex(0) Invalidated! Just after data was loaded.
[5.5.5] [4370 ] 2021-03-27 19:08:03.259 GMT+11:00 W FixedSizePagingController: onDataNeededAroundIndex(0) Invalidated! At beginning of load task.
mariachini commented 3 years ago

Same here, on a group chat. https://debuglogs.org/03ed64cfc53aabdafc629f8b0b33365d15579867c5294958c51959743f9acb71

JordyEGNL commented 3 years ago

https://debuglogs.org/683c1d01361c0e5361c2d89d2d2ce11610e397be43de8b268fefbb30dcd50ee9

Same here, takes a minute before it successfully sends the message, it stays at 1 checkmark.

It is (as many of you) in a large chat, with a long ongoing conversation beforehand.

Anti-ctrl commented 3 years ago

https://debuglogs.org/683c1d01361c0e5361c2d89d2d2ce11610e397be43de8b268fefbb30dcd50ee9

Same here, takes a minute before it successfully sends the message, it stays at 1 checkmark.

It is (as many of you) in a large chat, with a long ongoing conversation beforehand.

Most of us dont have the Problem that there is only one checkmark, but that the Message is "loading" 10 to xx Seconds before there is one, or two Checkmarks. My guess is, that the second Checkmark doesnt appear for you, because the Server cant handle the Traffic, or the Connection of you Partner is Slow, or the App got "hibernated" on the phone of your Chat Partner. Or maybe his/her Phone is just slow and needs some time to decrypt the Message, but if thats the case, then we have probably the same Problem as stated in the Beginning of this Thread.

Does your Chat Partner has long sending Times for his/her Messages in a long chat? So, that there is a loading circle under the Message for a somewhat long time ?

JordyEGNL commented 3 years ago

Does your Chat Partner has long sending Times for his/her Messages in a long chat? So, that there is a loading circle under the Message for a somewhat long time ?

If I remember correctly, yes. My chat partner has a loading circle and I have one checkmark. Connection is good, can still use YouTube, Discord etc. Tried 4G and WiFi, restarting the app.

Anti-ctrl commented 3 years ago

If I remember correctly, yes. My chat partner has a loading circle and I have one checkmark.

If he/she can, then maybe convince her/him to post a debug Log as he/she has the same Problem as the ppl here in this Thread. Please try to replicate the Problem on his/her Phone and Post a log as it happens or right after. I guess its fine if you Paste the Link here.

BTW, I have the same issue. As long as the Partner is sending a Message, mine doesnt come thru, because the Phone is busy. Thats especially annoying if your Partner has a somewhat slower Phone than you, as you have to wait even more.

EDIT: Also try and stop the Phone from Hibernating Signal. "Battery Saver" or "App Optimization" under Android tries a lot to keep down signal, if you dont use it for a few Hours, that leads to slow Notifications, or none at all, especially if you dont use it every day. You can stop "optimizing" signal in the Options on your/your Partners Phone. For most ppl it helps at least with slow notifications.

JordyEGNL commented 3 years ago

Yes this is sometimes the case, when for example I'm sending 3 messages after each other, and my chat partner sends a message after he received the first one, my other 2 messages stay at the loading icon until I have received his message on my phone.

Anti-ctrl commented 3 years ago

Yes this is sometimes the case, when for example I'm sending 3 messages after each other, and my chat partner sends a message after he received the first one, my other 2 messages stay at the loading icon until I have received his message on my phone.

Try and Trigger that Behavior and then Post a Debug Log here Immediately after. Do the same on the Other Side. More Debuglogs=more better.

You can find the Option for that in the App under Options --> More Options. Hope its translated like that, as my App is in German.

teynav commented 3 years ago

I am in a situation where each message takes around 6-10 sec to get send, this is such a bummer, although it gradually increased with time, I really don't know how to deal with this, I can't clean the chat with said person, I wish i could mark some message as "starred" and somehow those messages are not cleared while removing older messages automatically after set threshold. Due to unavailability of said features condition has really become bad on chat.

Wheest commented 3 years ago

I have an inkling that in some cases it could be related to available swap space on the device. My device is regularly running out of internal storage, and if I have a lot of apps running things can get slow. I haven't done a rigorous test for this though, perhaps this has already been considered by the main devs.

I will be upgrading my device in the coming days, and be migrating my chats over. With double the resources, I expect that the problem will go away, though with a device change the reasons for that could be many.

ProactiveServices commented 3 years ago

I have an inkling that in some cases it could be related to available swap space on the device.

In my case the handset usually had 2GB of 4GB RAM free and had no problems with other, more memory-intensive apps. I also tested after rebooting the phone and it made no difference.