Extreme lag from many characters individually formatted as spoilers
- [x] I have searched open and closed issues for duplicates
- [x] I am submitting a bug report for existing functionality that does not work as intended
- [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [x] This isn't a feature request or a discussion topic
Bug description
A message consisting many characters individually formatted as a spoilers will cause significant amounts of lag when the message is in view. If animations are disabled in Android settings, the particle effect on the hidden text will be static, yet the lag persists. Scrolling the message out of view, tapping the text to unhide the spoilers, or deleting the message all work to resolve the lag. Large messages formatted this way also affect the main screen with the list of chats when the chat containing the message is in view.
Formatting the same amount of characters as a single spoiler does not result in the lag. The issue does not appear to be present with the other, static formatting options such as bold.
Though this is an unlikely use case in normal use, it can certainly be used maliciously to effectively cripple someone else's signal chat given enough formatted characters. I wouldn't expect Signal to actually handle extreme cases of such messages and process all the animations but mitigating the effects of these to allow the user to resolve the issue such as deleting the message would be desirable.
I originally posted here as I wasn't sure if this counted as a but, but was advised to open an issue: https://community.signalusers.org/t/maliciously-formatted-spoilers-can-cause-extreme-lag/54421
Steps to reproduce
- Type in a single character in a new message
- Select it and format it as a spoiler
- Select and copy the formatted character
- Paste it many times (~125 caused fairly noticeable lag, ~75 had a slight, but noticeable effect)
- Send the message
Actual result: When the message is in view, Signal becomes very laggy, with increasing severity with more of these characters Expected result: Signal still performs reasonably smoothly
Screenshots
A message consisting of 125 such characters:
Device info
Device: Samsung Galaxy S9 (SM-G960W) Android version: 10, Samsung One UI version 2.5 Signal version: 6.24.4
Link to debug log
https://debuglogs.org/android/6.24.4/3fb8adc99216b46fa95bdd8760ee1b556e8a18f4f494cbcbaf76a29cd3ea9cb4
Thanks for the report. We made a tweak in 6.26.2 that fixes a pretty bad perf hit in the conversation list that we think was likely impacting conversation view as well. When it's available to you, could you give it a try?
I just tried 6.26.3 and I'm still seeing similar behaviour as I was before. One thing that does seem to be different is that disabling animations does seem to resolve the lag, whereas before the lag still seemed to persist despite animations being turned off in Android settings. But otherwise such messages are still causing lag on the conversation view as well as the conversation list for longer such messages.
Link to debug log
https://debuglogs.org/android/6.26.3/0369013bdd3aa31189aea5e688c50f87d650a8dae1f58f27cd638a4caf8dd505
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.
Still present on 6.32.5
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.
Still present in 6.40.5
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.
Still present in 6.44.3
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.
Still present in 7.1.3
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.
Still present in 7.7.2