Signal-desktop: App extremely slow to "Load messages" on macOS desktop

Created on 21 Jan 2018  ·  115Comments  ·  Source: signalapp/Signal-Desktop

v1.1.0

macOS 10.13.2

Loading messages ... took >30 seconds, for about 600 messages

Yes I've searched. This is very similar https://github.com/WhisperSystems/Signal-Desktop/issues/1842 though mine is on mac not linux and mine is 1.1.0

Steps to repro

Get a few hundred messages

then launch signal latest on mac

actual result:
it's very slow to start

expected
it would launch instantly

unfortunately i'm not comfortable including anything from the logs. sorry i realize this is overly paranoid.

Need Information

Most helpful comment

Cache the images locally so that subsequent start of the app does not take so long and does not consume a lot of network bandwidth/mobile data allowance.

FWIW, we already do that. What’s missing is to download attachments in the background and showing placeholders in the meantime.

All 115 comments

We will need your logs to move forward on this issue. Please feel free to reach out to me directly.

@scottnonnenberg this exact issue just happened for me. Messages 10-40 took ages and the rest were really really slow as well.

https://gist.github.com/anonymous/8d05df779b9f3ed7dafd0c80d7f5c41d

Some quick info while my teacher is speaking gibberish:
I started my Macbook, immediately started Signal and Chrome and the loading begun, slow as hell! A popup informed of the new beta update, I assumed this popup caused a delay in loading messages somehow so I clicked restart. When it started up again it was still slow as hell.

@Dyras Thanks for that example of slow load times. I notice that there are some unexplained multi-second delays sprinkled through that log. Can you tell me about your data directory? How big is it? Did it seem like your computer was working really hard during that time? (was the fan going? did you see the CPU line in Activity Monitor stay really high?)

Same problem here on macOS 10.13.3, every other app works like a charm. My MacBook is quiet and cool. Here is a log session after a refresh:

INFO  2018-02-24T22:45:00.815Z restart
INFO  2018-02-24T22:45:01.342Z Updating BrowserWindow config: {"maximized":false,"autoHideMenuBar":false,"width":1088,"height":758,"x":319,"y":114}
INFO  2018-02-24T22:45:01.450Z unloading conversation +[REDACTED]926 due to: windows closed
INFO  2018-02-24T22:45:01.452Z unloading conversation group([REDACTED] Â‘) due to: windows closed
INFO  2018-02-24T22:45:01.502Z unloading conversation +[REDACTED]684 due to: windows closed
INFO  2018-02-24T22:45:01.539Z unloading conversation group([REDACTED] Â‘) due to: windows closed
INFO  2018-02-24T22:45:01.541Z unloading conversation +[REDACTED]472 due to: windows closed
INFO  2018-02-24T22:45:01.632Z unloading conversation group([REDACTED]»ðz) due to: windows closed
INFO  2018-02-24T22:45:01.636Z unloading conversation +[REDACTED]665 due to: windows closed
INFO  2018-02-24T22:45:01.684Z unloading conversation +[REDACTED]684 due to: windows closed
INFO  2018-02-24T22:45:01.686Z unloading conversation +[REDACTED]302 due to: windows closed
INFO  2018-02-24T22:45:01.687Z unloading conversation +[REDACTED]309 due to: windows closed
INFO  2018-02-24T22:45:01.689Z unloading conversation group([REDACTED]»ðz) due to: windows closed
INFO  2018-02-24T22:45:01.690Z unloading conversation +[REDACTED]580 due to: windows closed
INFO  2018-02-24T22:45:01.692Z unloading conversation +[REDACTED]851 due to: windows closed
INFO  2018-02-24T22:45:01.694Z unloading conversation +[REDACTED]842 due to: windows closed
INFO  2018-02-24T22:45:01.695Z unloading conversation +[REDACTED]665 due to: windows closed
INFO  2018-02-24T22:45:01.697Z unloading conversation group([REDACTED] Â‘) due to: windows closed
INFO  2018-02-24T22:45:01.698Z unloading conversation +[REDACTED]684 due to: windows closed
INFO  2018-02-24T22:45:01.701Z unloading conversation group([REDACTED] Â‘) due to: windows closed
INFO  2018-02-24T22:45:01.703Z unloading conversation +[REDACTED]665 due to: windows closed
INFO  2018-02-24T22:45:01.705Z unloading conversation group([REDACTED] Â‘) due to: windows closed
INFO  2018-02-24T22:45:01.712Z unloading conversation +[REDACTED]472 due to: windows closed
INFO  2018-02-24T22:45:01.715Z unloading conversation +[REDACTED]665 due to: windows closed
INFO  2018-02-24T22:45:01.719Z unloading conversation +[REDACTED]684 due to: windows closed
INFO  2018-02-24T22:45:05.323Z app ready
INFO  2018-02-24T22:45:05.361Z Initializing BrowserWindow config: {"show":true,"width":1088,"height":758,"minWidth":640,"minHeight":360,"autoHideMenuBar":false,"webPreferences":{"nodeIntegration":false,"preload":"/Applications/Signal.app/Contents/Resources/app.asar/preload.js"},"icon":"/Applications/Signal.app/Contents/Resources/app.asar/images/icon_256.png","maximized":false,"x":319,"y":114}
INFO  2018-02-24T22:45:07.888Z Using OS-level spell check API with locale en_FR
INFO  2018-02-24T22:45:08.349Z pre-main prep time: 3 ms
INFO  2018-02-24T22:45:08.391Z Build expires:  2018-04-30T22:28:55.000Z
INFO  2018-02-24T22:45:08.448Z background page reloaded
INFO  2018-02-24T22:45:08.448Z environment: production
INFO  2018-02-24T22:45:08.694Z Updating BrowserWindow config: {"maximized":false,"autoHideMenuBar":false,"width":1088,"height":758,"x":302,"y":106}
INFO  2018-02-24T22:45:08.745Z ConversationController: starting initial fetch
INFO  2018-02-24T22:45:08.899Z ConversationController: done with initial fetch
INFO  2018-02-24T22:45:08.899Z listening for registration events
INFO  2018-02-24T22:45:08.900Z Next signed key rotation scheduled for "2018-02-25T10:54:22.737Z"
INFO  2018-02-24T22:45:08.900Z connect
INFO  2018-02-24T22:45:08.900Z getAllFromCache
INFO  2018-02-24T22:45:08.900Z opening message socket https://textsecure-service.whispersystems.org
INFO  2018-02-24T22:45:08.900Z open inbox
INFO  2018-02-24T22:45:09.811Z websocket open
INFO  2018-02-24T22:45:09.820Z got request PUT /api/v1/queue/empty
INFO  2018-02-24T22:45:33.883Z getAllFromCache loaded 4 saved envelopes
INFO  2018-02-24T22:45:33.885Z getAllFromCache final attempt for envelope +[REDACTED]200.1 1519214559732
INFO  2018-02-24T22:45:33.887Z getAllFromCache final attempt for envelope +[REDACTED]200.1 1519240114054
INFO  2018-02-24T22:45:34.989Z queueing decrypted envelope +[REDACTED]200.1 1519214559732
INFO  2018-02-24T22:45:34.991Z queueing decrypted envelope +[REDACTED]200.1 1519240114054
INFO  2018-02-24T22:45:34.991Z queueing decrypted envelope +[REDACTED]200.1 1519410114584
INFO  2018-02-24T22:45:34.991Z queueing decrypted envelope +[REDACTED]200.1 1519474574850
INFO  2018-02-24T22:45:34.993Z read messages from +[REDACTED]200.1 1519214559732
INFO  2018-02-24T22:45:34.996Z read sync +[REDACTED]580 1519214474698
INFO  2018-02-24T22:45:35.004Z No message for read sync +[REDACTED]580 1519214474698
INFO  2018-02-24T22:45:35.005Z read messages from +[REDACTED]200.1 1519240114054
INFO  2018-02-24T22:45:35.005Z read sync +[REDACTED]309 1519240106366
INFO  2018-02-24T22:45:35.013Z No message for read sync +[REDACTED]309 1519240106366
INFO  2018-02-24T22:45:35.013Z read messages from +[REDACTED]200.1 1519410114584
INFO  2018-02-24T22:45:35.013Z read sync +[REDACTED]926 1519410108256
INFO  2018-02-24T22:45:35.020Z No message for read sync +[REDACTED]926 1519410108256
INFO  2018-02-24T22:45:35.021Z read messages from +[REDACTED]200.1 1519474574850
INFO  2018-02-24T22:45:35.021Z read sync +[REDACTED]309 1519474516683
INFO  2018-02-24T22:45:35.028Z No message for read sync +[REDACTED]309 1519474516683
INFO  2018-02-24T22:45:35.029Z MessageReceiver: emitting 'empty' event
INFO  2018-02-24T22:45:35.030Z updating notifications - count: 0 focused: false enabled: true
INFO  2018-02-24T22:46:00.309Z queueing envelope +[REDACTED]472.1 1519512357217
INFO  2018-02-24T22:46:00.311Z message from +[REDACTED]472.1 1519512357217
INFO  2018-02-24T22:46:00.391Z data message from +[REDACTED]472.1 1519512357217
INFO  2018-02-24T22:46:00.408Z GET https://textsecure-service.whispersystems.org/v1/attachments/529586384092733537
INFO  2018-02-24T22:46:00.859Z GET https://textsecure-service.whispersystems.org/v1/attachments/529586384092733537 200 Success
INFO  2018-02-24T22:46:00.860Z GET https://whispersystems-textsecure-attachments.s3-accelerate.amazonaws.com/529586384092733537?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180224T224600Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=AKIAJHWS3AOTJTASHBDA%2F20180224%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=0371caf7823f23399efa61d860df540ec3c0dd44be48f215a221c9668a446b95
INFO  2018-02-24T22:46:01.767Z GET https://whispersystems-textsecure-attachments.s3-accelerate.amazonaws.com/529586384092733537?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180224T224600Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=AKIAJHWS3AOTJTASHBDA%2F20180224%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=0371caf7823f23399efa61d860df540ec3c0dd44be48f215a221c9668a446b95 200 Success
INFO  2018-02-24T22:46:01.855Z adding notification
INFO  2018-02-24T22:46:01.856Z updating notifications - count: 1 focused: false enabled: true
INFO  2018-02-24T22:46:01.856Z draw attention
INFO  2018-02-24T22:46:01.861Z remove all notifications
INFO  2018-02-24T22:46:37.220Z fetchMessages
INFO  2018-02-24T22:46:37.240Z GET https://textsecure-service.whispersystems.org/v1/profile/+[REDACTED]472
INFO  2018-02-24T22:46:37.735Z GET https://textsecure-service.whispersystems.org/v1/profile/+[REDACTED]472 200 Success
INFO  2018-02-24T22:46:41.066Z hide-menu-bar changed to true
INFO  2018-02-24T22:46:42.015Z hide-menu-bar changed to false
INFO  2018-02-24T22:46:45.679Z Conversation +[REDACTED]472 took 8452 milliseconds to load
INFO  2018-02-24T22:46:45.723Z GET https://cdn.signal.org/profiles/sW5WlPVxB-kC3g78DIX0eQ
INFO  2018-02-24T22:46:45.762Z Sending 1 read receipts
INFO  2018-02-24T22:46:45.901Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]200
INFO  2018-02-24T22:46:46.210Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]200 200 Success
INFO  2018-02-24T22:46:46.240Z GET https://cdn.signal.org/profiles/sW5WlPVxB-kC3g78DIX0eQ 403 Error
INFO  2018-02-24T22:46:46.251Z done with status fetch
INFO  2018-02-24T22:46:46.993Z Loaded this list of log files from logPath: log.log, log.log.0

Same here on Windows 10 Desktop app.
One week not used the laptop. The loading of a few 100 messages takes up to 10 minutes. I cannot use the desktop app in the meantime.

Two logs from my Macbook from 2010, the logs are taken right after Signal finished loading. Since it's old, being slow as hell is more or less expected but a friend of mine has a modern laptop with an SSD, and it's slow for her too.

My Macbook was using around 90% of the CPU while loading. Don't know about my friend, I'll try to find out next time.

My logs:
https://gist.github.com/anonymous/f922a9e4079446704e75b79892d6216f
https://gist.github.com/anonymous/88056066d34401f988a80ba7024ece50

Her log:
https://gist.github.com/anonymous/e1a5e0d715c27645056e82ba2fc2fa1c
2018-02-25T16:30:11.303Z <-- I think you should start there, otherwise I'd suggest ctrl+f:ing "App ready"

Hi,

I have the exact issue on windows (slow loading), except my logs show some errors:

INFO  2018-03-07T11:38:52.145Z contact sync
INFO  2018-03-07T11:38:52.145Z GET https://textsecure-service.whispersystems.org/v1/attachments/640___7269
INFO  2018-03-07T11:38:52.416Z GET https://textsecure-service.whispersystems.org/v1/attachments/6401___7269 200 Success
INFO  2018-03-07T11:38:52.417Z GET https://whispersystems-textsecure-attachments.s3-accelerate.amazonaws.com/640___269?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180307T113851Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=AKIA___BDA%2F20180307%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=5ad45___ad7a7e
INFO  2018-03-07T11:38:52.516Z GET https://whispersystems-textsecure-attachments.s3-accelerate.amazonaws.com/640___69?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180307T113851Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=AKI___BDA%2F20180307%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=5ad4___d7a7e 404 Error
INFO  2018-03-07T11:38:52.516Z queueDecryptedEnvelope error handling envelope +[REDACTED]645.1 1518431619203 : HTTPError: promise_ajax: error response; code: 404
    at HTTPError (file:///C:/Users/thomas/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:37619:17)
    at file:///C:/Users/thomas/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:37577:22
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:109:7)
Original stack:
Error
    at ajax (file:///C:/Users/thomas/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:37611:25)
    at TextSecureServer.<anonymous> (file:///C:/Users/thomas/AppData/Local/Programs/signal-desktop/resources/app.asar/js/libtextsecure.js:37875:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:109:7)
INFO  2018-03-07T11:38:52.516Z contact sync

(I removed some Ids in logs)

So it takes 400ms per error (by looking at the time in logs), which could explain the slow loading

I can send the full logs by mail if you need

My contact information is in my profile. We could always use more performance-related logs. Thanks!

Took several minutes to load just a few hundred messages. This happens every time I start Signal.

Platform: Windows 10 Pro x64 Build 16299
Signal version: 1.6.1

Logs are here.

I have the same issue. Additionally, some messages are lost (Windows 10).

With latest version, no more issue.
Thank you

Latest version fixed the issue on Windows as well!

100 messages used to take 2 minutes to load. It now takes 4 seconds. 40 seconds to start the app if you have 1000 queued messages is fine by me. No complaints!

My unibody Macbook is a relic so whatever magic you threw in totally works. Now if only we could hide contacts ;)

Glad to hear that things have improved, everyone. :0)

1.7.0-beta.3 and 1.7.0 introduced a change to put attachments on disk instead of in the database, which drastically reduces load on the database.

The thing that's odd, though, is how quickly you all saw improvement. It moves attachment to disk in the background - do you have it running all the time in the background? Or potentially the effect comes from putting newly-received attachments on disk?

I almost never open Signal on my Macbook unless I'm in school, which is about once a week. I'd say the newly-received attachments were the culprit. I send a lot of images and videos every day.

I still have 2+ minute load times on a 2016 15" MacBook Pro - opening Signal Desktop with 500+ new messages (even though they've been read on my phone) takes upwards of 2 minutes. No noticeable CPU load or fan load, it just takes forever. There are sometimes a lot of images in those messages, but not always, and that doesn't seem to make a difference.

What logs can I provide for troubleshooting?

@ideologysec In your situation, I don't think it will get any better until we change how we handle attachments. In your case, we download quite a few megabytes during loading, because we're downloading every image in every message that isn't yet downloaded. In the future we'll download attachments in the background, but for now any message with an attachment will make you wait that much longer on the loading screen.

@scottnonnenberg-signal How about a desktop setting not to include or open attachments and instead have a text notification about them in the message that you can click on to make them download? This could be per channel or global..

How about a desktop setting not to include or open attachments and instead have a text notification about them in the message that you can click on to make them download?

To me, that looks like a degradation of user experience.

Ideally, I'd like the desktop app to:

  • Cache the images locally so that subsequent start of the app does not take so long and does not consume a lot of network bandwidth/mobile data allowance.
  • Load images in background and/or load only images from the last N messages in each conversation, where N can be an approximate number of messages that fits into a single screen.

Cache the images locally so that subsequent start of the app does not take so long and does not consume a lot of network bandwidth/mobile data allowance.

FWIW, we already do that. What’s missing is to download attachments in the background and showing placeholders in the meantime.

I was six minutes already, while I'm trying to send a just simple message to a friend of mine in the same room. Loading messages, 220 so far...

Blocking the main thread + UI is already degrading the user experience; I know that Electron was chosen for cross platform reasons but this isn't helping the perception of Electron apps as slow bloated hogs (not to mention all of the non-native antibehaviors like not supporting text expansion or being forced to drop attachments into the send bar instead of the main window...)

I assume that the problem would be mitigated if I left Signal open all the time... but it's an Electron app, and eats RAM!

@lebed2045 @ideologysec Do you two send a lot of attachments? Like tons of videos?

no, no attachments at all, occasionally I send and receive links.

On Mon, Jun 11, 2018, 7:56 AM Dyras, notifications@github.com wrote:

@lebed2045 https://github.com/lebed2045 @ideologysec
https://github.com/ideologysec Do you two send a lot of attachments?
Like tons of videos?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/signalapp/Signal-Desktop/issues/1990#issuecomment-396273128,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AjK3EWsEpicx0MO1Va8HPMKLKGkucU7lks5t7oUPgaJpZM4Rl_vX
.

Same here. Been about 2 minutes and it has only loaded 150 messages. Then about 30 seconds later it loaded all of it. 2:30 is a bit much for loading an app.

Same thing here on Windows 10. In my case it takes almost 3min for 100 messages.

Almost opened a duplicate since issue title is slightly misleading. Should title be changed to reflect that issue is multi-platform?

Let me know if there is any logs or similar I can send to help with the issue.

@Dyras my entire conversation history has 5 x .gifs, 5 x photos (taken with phone), 2 x short videos (taken with phone). Doesn't seem like a lot

@jcollum @joaobarcia Please provide debug logs whenever you talk about a bug here on GitHub, unless you know for sure that we won't need a log. A log is our best bet for tracking down the performance issues you're running into.

@scottnonnenberg-signal , see the full log at https://gist.github.com/joaobarcia/819fc12ad31553b76cf7c93310ae7872

As a reference, the app now opened without issues but when I tried to open around the 14h10 mark I was having the issue.

Thanks

The issue came back one or two updates ago, after going away several updates back. It's not as bad, but still can take up to a minute or two to load. Sorry for the lack of specifics, it's been an annoyance more than anything so haven't been tracking it too closely.

Occurs on Windows 10 desktop and laptop, both on version 1709 and after upgrading to 1803.

@GhostofGoes We really need that debug log. View -> Debug Log.

https://debuglogs.org/7ac99b9575ad3b32dfc7bbc76b07d697d92e2d6c8edca1d818585cf23be723d7

Also having long load times on both Linux and Windows (I dual boot on my desktop). The debug log is for my Linux installation. Thank you very much for your work!

@knokelmaat That most recent startup took about two minutes, and it pulled down and processed about 60 contact syncs, which is a whole lot - and each one involves a file download and a lot of database updates. What kind of mobile device do you use? Are you frequently modifying/adding/removing contacts? Also, had your desktop device been offline for a long time before that?

@apphancer Your last startup was about 90 seconds, and was similarly filled with contact syncs. Same question to you - what mobile device, and have you been making updates to your address book a lot lately?

@scottnonnenberg-signal perhaps one or two new contacts at the most.
Huawei P9 with Android 6

I run Signal Desktop on a new MacBook Pro and it takes ages to start. It's always been this way and non of the many, many new versions that it's constantly updating itself to have fixed the problem. Here's a log from just now where it took over three minutes to load just over 100 messages:

https://debuglogs.org/21e07ba369668d51041254621e3213f10e65f2c4e6fc628dde9d89c7e0130c52

While glancing through the logs I can see loads of 404s in there. Dunno if that's related. Also lots of messages saying "Ignore invalid expire timer. Expected numeric expireTimer, got: null" which doesn't sound great.

@markshep Looks like you're falling prey to the 'many contact sync' performance issue like the others. Apparently there are apps on Android which can sometimes do the wrong thing with contacts, like LinkedIn or Facebook, updating it with the latest information from those sites. Every time Signal starts up and discovers contact updates, it will send out a contact sync to keep things up to date.

@markshep @apphancer @knokelmaat It would help us better understand this if we could try this behavior out for ourselves. What apps do you have on your phones which might make changes to your contacts?

@scottnonnenberg-signal not really sure, but here's the list of the 25 apps that have "contacts" permissions on my phone:
Airbnb, BlueMail, Calendar (Huawei), Calendar (google), Docs (google), Google Drive, Email (Huawei), FahrInfo, Gboard, Gmail, Google, Google Play services, HiCare (huawei), Huawei Contacts, JuiceSSH, ManFIT, Messaging (Huawei), Photos (google), Pocket, ProtonMail, Revolut, Signal, Skype, Toggl, TuneIn Radio, myTaxi.

Thanks @apphancer. At this point we're looking for Android debug logs. Please provide them when you get a chance.

Same thing here on Debian AND Windows10.

  1. it should not take 4+ minutes to load a few hundred messages, especially on a 300mbit internet connection
  2. it should not download all attachments and messages every freaky time i start the app

@mer-at Sorry to hear that it's slow for you. You can help by providing logs from all three of your devices - Debian, Windows10, and your mobile device.

@scottnonnenberg-signal I run LineageOS on a Moto G 3 (osprey). My app was at 4.19 or so, now at 4.21.4. I am going to see if the problem persists. If so, I will post both logs here (desktop and mobile).

@mer-at I notice that 77 contact syncs were processed during that startup, meaning that Signal Android is detecting changes to your contacts and sending messages to update Signal Desktop very frequently. Are you adding/updating/removing contacts frequently? What other apps do you have installed on your android device which might be modifying your contacts?

Regarding deletions, what exactly did you delete? Messages in Signal Desktop, or in Android? Either way, the 1000 message queue we have in place for every device won't be affected by deletions. If a message is sent to your device, it will download and process it. Even if it's been deleted on another device, or it has disappeared. We have to download it, then process another message from one of your other devices saying that it was read and can now be deleted.

Are you adding/updating/removing contacts frequently? -> No.
What other apps do you have installed on your android device which might be modifying your contacts? -> lots of. Camdav, easydav, calendar, contacts, messages, signal, sms, phone, telegram, whatsapp

sounds like it's broken by design. it should not download 50mb of messages each start. it should download messages only if i actually open the conversation and view them. and then it should not download all messages in a conversation, only the latest ones. if you scroll up, it should download and display earlier ones.
otherwise this whole messaging system will never be able to scale well.

Just noticed that this seems to be a duplicate of #1842 . (and now noticed that this info is right on the main issue description :P )

These two issues combined seem to have the highest amount of comments and upvotes (excluding feature requests) in the repo. Both issues are tagged as "Need Information". Let us know if there is any help we can provide besides debug logs, I'll be glad to help!

@joaobarcia Your log had a similar situation. The most recent startup took about 80 seconds, and 76 contact syncs were processed. Again, a contact sync is when your mobile device decides to send its contact information over to Signal Desktop. This is primarily happening with Android, which is always looking for updates to your contact database on the device. What we're looking for now is the culprit (or many, if that's the case) for repeated contact database updates, to the tune of 30 to 40 per day.

https://debuglogs.org/50f8e0e230d72c4b8c4e405a4bcb925d45bec930bdafb22a3860de890b650956
this is a debug log of my Android app, hope it helps (i accidentally posted on another issue too)

One typical day of messaging takes about 20 minutes to load on my 2011 Macbook Pro. Here's the log.

@outadoc I notice that you've removed the beginning of the log. Is there a reason for that? Also, it looks like it was 14 minutes from getting back online to being done processing all that. Based on the log, the application wasn't stuck on a loading screen during that time, right? Anyway, what can you tell me about the load on your computer during that time? High CPU usage, perhaps? Lastly, can you tell me the size of your ~/Library/Application Support/Signal directory?

@scottnonnenberg-signal The deleted lines were just irrelevant logging from the last few days. The log starts when I resumed the app, after the computer came back from sleep. I don't believe it was stuck on the loading screen but merely loading every message one by one, slowly; the loading screen only shows up when I launch the app, but the delays are similar.

The CPU usage is variable while loading but usually pretty high, 20 to 50%, but it's not noticeable. Signal Helper takes up ~830 MB of RAM.

~/Library/Application Support/Signal is 485.8 MB at the time of writing.

Thanks for your time.

I am again posting my desktop logs, just closing the app and reopening causes the reasonably long loading, on Arch Linux this time:
https://debuglogs.org/6c95025177f03e1ee369877d61726260a3e3e7bd1b663f0d1edaae35edaa6aa6

Happened again. Got a log this time.

Windows 10 Pro version 1803, build 17134.112

Took about 2-3 minutes to load. Didn't monitor CPU usage unfortunately. CPU is i7-4790k.

@GhostofGoes Yep, huge numbers of contact syncs in that debug log. Something is modifying your contacts, causing Signal to detect that when it starts up and send all of that data to desktop. Quite frequently. I've already spoken with Android and they're not quite sure how to solve this problem because you do want Contact changes to be reflected in Desktop, right? :0) I'd encourage you to file a bug in the Signal Android repository and you can work with them on what the right solution is.

Is there a way to tune or temporarily disable the contact updating feature?
My main desire is to be able to message people. My contacts rarely change
(a few a week at most), so I would rather have a working system over out of
date contacts.

On Thu, Jul 5, 2018, 10:30 Scott Nonnenberg notifications@github.com
wrote:

@GhostofGoes https://github.com/GhostofGoes Yep, huge numbers of
contact syncs in that debug log. Something is modifying your contacts,
causing Signal to detect that when it starts up and send all of that data
to desktop. Quite frequently. I've already spoken with Android and they're
not quite sure how to solve this problem because you do want Contact
changes to be reflected in Desktop, right? :0) I'd encourage you to file a
bug in the Signal Android repository and you can work with them on what the
right solution is.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/signalapp/Signal-Desktop/issues/1990#issuecomment-402780151,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGS0jOCp0E-4nC3Hr4LjpBfWOyMtO3fFks5uDj82gaJpZM4Rl_vX
.

@GhostofGoes That's a good question for the Signal forums: https://whispersystems.discoursehosting.net/

But I do have one idea. You could try revoking Contacts permissions fpr Signal Android. Just remember that you'd need to turn it on again if you notice that things are out of date with your System contacts.

Thanks Scott. In the future, would the forums be a better place to report
issues like this?

On Thu, Jul 5, 2018, 10:43 Scott Nonnenberg notifications@github.com
wrote:

@GhostofGoes https://github.com/GhostofGoes That's a good question for
the Signal forums: https://whispersystems.discoursehosting.net/

But I do have one idea. You could try revoking Contacts permissions fpr
Signal Android. Just remember that you'd need to turn it on again if you
notice that things are out of date with your System contacts.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/signalapp/Signal-Desktop/issues/1990#issuecomment-402783719,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGS0jF3AxtwSifq25nlUqVRGfF0c_jMJks5uDkI0gaJpZM4Rl_vX
.

Do others encountering this problem use DAVdroid on Android to sync their contacts with a (non-gmail) CardDAV server? I'm not sure how to extract debug info from DAVdroid, but I have a theory that something in DAVdroid is misbehaving and registering thousands of spurious of contact updates, which Signal for Android is diligently syncing to my Mac.

Yesterday, I started Signal on my Mac after it being off for just a single day, and it synced over 6,000 "messages" before it was usable. During that day, I sent/received maybe 20 legitimate messages through Signal for Android. I see lots of references to contact sync in signal logs, even though I know for sure that I did not make any manual contact updates on Android during this time.

Just experienced the _extremely_ slow "messages loading" screen. Felt like half an hour. MacBook Pro (15-inch, 2016)

Debug log here.

Extremely slow on Ubuntu Linux too, v1.14.4. Loaded about 200 messages in 2 minutes.

@Bomper Your report isn't very useful without a log to help us determine the cause of the slow load. Do be aware that we download all attachments associated with those incoming messages, so one limiting factor is likely your download bandwidth.

Fairly slow to start on my MBP after an update. 10.13.6, 2.2 GHz Intel Core i7, 16 GB, SSD

https://debuglogs.org/b8ed66b7c3537a9169eb8b49c4c4529442d2afe248c89839ded1c7f472be9476

Slow to start for me too. I do sling some images around and I have a fairly slow connection, so I'm guessing that's the culprit as well, however in case it's useful, my log for reference:
https://debuglogs.org/e365d02a24a573ce6d7fd45a97cf009ae825a68519c37585e3fd2aaf057fd5df

@scottnonnenberg-signal

In the future we'll download attachments in the background, but for now any message with an attachment will make you wait that much longer on the loading screen.

Any thoughts about when this enhancement will come into play? I suspect this will greatly enhance my _perceived_ performance of startup.

Thanks!

@chucksense We generally don't talk about our future plans. But I can point to some big changes we are working on right now: https://github.com/signalapp/Signal-Desktop/releases/tag/v1.15.0-beta.7

Needs "android change needed" flag, particularly if users are being told to open a bug for Android for this. All due respect, I think that approach is a great way to not get the contact-sync spam fixed for many more months, as somebody would have to go through the entire hassle of generating what is essentially a duplicate bug report, crossing every T and dotting every I, and then because it's a bug that doesn't impact performance on Android itself, who knows how long it will languish. Perhaps coordination between teams on your end is a better solution for this particular issue.

@deutrino There has been some coordination on our end, and a fix is in recent Android builds (though still beta-only at this point): https://github.com/signalapp/Signal-Android/commit/bf692e8da354d3bfd44fe85fb3abb3cadec5e857

I'm on the Android Beta program and just upgraded to Signal Desktop 1.15.0 and the start up was almost instant! What great improvement!

Did 1.15.0 introduce something that caused this speed-up?

@leonardehrenfried It has very large changes in it, detailed here: https://github.com/signalapp/Signal-Desktop/releases/tag/v1.15.0

If you submit a debug log, we could take a look at how many messages were migrated to SQLCipher, etc. Anyway, please continue to let us know how v1.15.0 works for you.

Here is my debug log: https://debuglogs.org/2492b4ec48858f51e36c3136f577c0be28d0abee7d5840ee49dafccfae54ca18

I can't speak for everyone but I consider this issue fixed. Thanks for the great work, @scottnonnenberg!

@deutrino There has been some coordination on our end, and a fix is in recent Android builds (though still beta-only at this point): signalapp/Signal-Android@bf692e8

I observe a huge speed-up too! That start-up was almost instant. This helps me share things quickly when I'm on desktop instead of staring at the "Loading messages ..." screen for a long time.

Though I have yet to test this after some activity on the device to test it works well in that case too.

That start-up was almost instant.

To add to this, I couldn't call it instant as it got stuck in the "Loading ..." message (not the old "Loading messages ..." screen) for some time. Though, it was a short delay and is trivial when compared to the long delays that were seen in previous versions.

Thanks for the awesome work! :bouquet: :tada:

Running Signal 1.15.0-beta.5 on Linux, the loading screen stays for ~50 seconds (up until "_Loading messages, 100 so far..._") and only then the Signal main window appears. When run under strace(1) (and with --disable-gpu due to #2378) I noticed that ETIMEDOUT was returned quite often:

     58  = -1 EEXIST
    112  = -1 EINVAL
   1163  = -1 ENOENT
   3391  = -1 ETIMEDOUT
 128234  = -1 EAGAIN

....and ETIMEDOUT alone took 15 seconds of the whole startup:

R: EEXIST        0.005097
R: EINVAL        0.002054
R: ENOENT        0.032118
R: ETIMEDOUT    15.6613
R: EAGAIN        4.96944

I found Electron issue #9485 with similar messages, although Signal does not seem to hang _during_ its usage, so I don't know how related that issue is to the long loading times described here.

On stdout the following repeats over and over again:

{"name":"log","hostname":"horus","pid":27708,"level":30,"msg":"Got sync message with our own profile key","time":"2018-08-06T05:07:49.661Z","v":0}
{"name":"log","hostname":"horus","pid":27708,"level":30,"msg":"contact sync","time":"2018-08-06T05:07:50.183Z","v":0}
{"name":"log","hostname":"horus","pid":27708,"level":30,"msg":"GET https://textsecure-service.whispersystems.org/v1/attachments/NNN","time":"2018-08-06T05:07:50.184Z","v":0}
{"name":"log","hostname":"horus","pid":27708,"level":30,"msg":"GET https://textsecure-service.whispersystems.org/v1/attachments/NNN 200 Success","time":"2018-08-06T05:07:51.081Z","v":0}
{"name":"log","hostname":"horus","pid":27708,"level":30,"msg":"GET https://whispersystems-textsecure-attachments.s3-accelerate.amazonaws.com/NNN?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180806T050751Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=xxxFus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=xxx","time":"2018-08-06T05:07:51.082Z","v":0}
{"name":"log","hostname":"horus","pid":27708,"level":30,"msg":"GET https://whispersystems-textsecure-attachments.s3-accelerate.amazonaws.com/NNN?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180806T050751Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=xxxFus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=sss 200 Success","time":"2018-08-06T05:07:51.871Z","v":0}

The full strace logs can be made available, if needed.

@ckujau What you're noticing is the 'contact sync flood' problem discussed above. It's downloading an attachment sent by your mobile device with all of your latest contact information. Are you on Android? What version?

I have Signal 4.24.6 (beta) installed on a Sony XZs running Android 8.0.0 (07/2018 patch level).

But...why does it download the attachment over and over again? Once started, and closed again, the immediate next start again takes a very long time. But I guess this is what this bug is about ;)

@sivaraam Would love a debug log to see what that extra loading time is coming from.

From my side, yesterday's update would get stuck on launch with an "optimizing messages" message.

Today's update seems to be working great! Haven't started app/rebooted often enough to 100% confirm fix, but seems to be fixed.

Happy to send the debug log if it's in any way helpful

@sivaraam Would love a debug log to see what that extra loading time is coming from.

I'll give them when I get back to my computer the next time. In the mean time, any pointers about how to get the logs would be useful.

From my side, yesterday's update would get stuck on launch with an "optimizing messages" message.

I did saw that optimizing messages screen too. It seems to be a one-off processing to handle the upgrade from previous versions, I suppose.

@sivaraam You can get your debug log at View -> Debug Log

Bug is back on my laptop. I'd like to share a log, but the settings button is hidden, and I can't un-hide it without accessing the settings...

@GhostofGoes You should be able to use the 'alt' key on Windows to show that menu if it's been hidden.

@sivaraam You can get your debug log at View -> Debug Log

May be I was prematurely excited. I'm seeing the "Loading Messages. ..." screen again :disappointed: This is on Signal for desktop version 1.15.0 (release). I use Signal for Android version 4.24.8

The desktop app also hanged a little on the "Loading .." screen. FWIW, the network was a little sluggish when the logs were taken.

https://debuglogs.org/9ce7e74688bf48c60add8c0be72eaadb9807399e531501ad0acdcaeb12f0c430

@scottnonnenberg Thank you! Here's the debug log of the latest slow load. Occurred a few minutes ago, when opening signal after rebooting my laptop.

@GhostofGoes Looking at your log, every time you start up Signal Desktop it at least 10 contact syncs right in a row. What mobile app (and version) is your Signal Desktop linked to? Older Android versions had problems sending contact syncs too often, more recent versions have scaled that back.

Android signal version 4.24.8, which is the latest available from the Google Play store as of last night. I tried disabling contacts a few weeks ago, didn't seem to make any difference.

Loading v1.15.4 is fast. Thanks!

@GhostofGoes I just released v1.15.5 which fixes an issue where contact syncs would be continually reprocessed. Your next startup might still be slow, but startups after should get a bit faster.

@scottnonnenberg-signal Wow, startup is screamin' fast now! Thanks for the fix! 👍

It's a lot faster for me on Linux desktop as well (v1.15.5). Thanks!

I just opened Signal Desktop and was greeted with about 30 seconds of the "Loading 20 messages..." screen after only having used the Android (beta app) over the weekend.

30 seconds isn't too bad but I was wondering why the screen counted up to 620 messages, when I sent at most 100 (more like 50) Signal messages over the weekend. Even if it was 620 messages (mostly text, just a few images) shouldn't that be faster than the 30 seconds?

Here is my debug log: https://debuglogs.org/aa8f342f7761e09f63d76c81eefb7ec2630fb2894ea8133516072ed080eea13c

@leonardehrenfried Hey there - thanks for checking in and and providing your log. The messages we need to process can be substantially more than the messages you see in the app - for example, if you're in a large group, and you send a message to it, you'll get a delivery receipt message from each member. Your phone will also periodically send its complete set of contact information to your desktop, another invisible message type.

I upgraded to v1.15.5 and still see no improvements. I still get the Loading messages screen which takes a some time to complete. To make things worse, Signal Desktop seems to be requiring a lot of resources during initial startup. It just seems to be unresponsive for a few seconds and it went to an extent that the OS considered the application unresponsive and asked me whether to kill it or not.

I use Signal for Android's beta version (by signing up for the beta programme) on a Samsung Galaxy J1 Ace (Android 5.1.1) if that's worth noting.

Debug logs for Signal Desktop

What is the major difference between this Electron app and the Chrome extension app that Signal previously used as a desktop client? Because the latter always opened instantly (and still does). Were they designed differently?

@Mushoz The chrome app was always running in the background, whenever Chrome was running. Thus, it was always up to date, always downloading messages. That's the primary difference.

@sivaraam How long does that Loading screen take for you in clock time? And how high does the number of messages processed get?

@scottnonnenberg Adding an option to start on boot could slightly mitigate that problem, right? Now the problem is that I want to message someone, I open Signal and I'm hit with the loading screen that ruins my experience.

Wouldn't it be possible to let people write new messages without waiting for the old ones first?
Is loading messages gradually, starting from the newest ones (while a user is able to type new messages) possible? If the Chrome extension can load messages in the background, shouldn't the app be able to do the same?

@butla I would encourage you to read up-thread and in other performance-related issues in this repo to see the discussion about potential performance mitigations. There's a specific issue focused on getting rid of the loading screen.

@sivaraam How long does that Loading screen take for you in clock time?

The "_Loading .._" screen that comes before "_Loading messages .._" screen took ~30s. The "_Loading messages .._" screen took ~1m 30s to complete.

I suspect the timing is a bit high due to the fact that the network might have been a little sluggish. I feel that as I use a Wireless network and the speed isn't consistent, of course. Further the "_Loading messages .._" numbers increased slowly which added to my suspicion. fast.com reported a speed of 2.6Mbps around that time.

And how high does the number of messages processed get?

For a very low volume week (by which I mean I didn't send a lot of messages during the week), the number went upto 30.

Signal v1.15.0-beta.5 on Linux (with Signal Beta 4.25.10 running on Android 8.1) starts much faster now, 15 seconds instead of 50, yay! Much joy, thank you for fixing this!

@ckujau Beta is now at v1.16.1-beta.1 - it has further performance enhancements.

Yeah, I've seen that but that version is segfaulting here...and may be material for another report :)

@ckujau Yep that's a different bug. And if you installed it any other way than apt, you'll have to contact the person who maintains that package.

I'm on Windows 10 with Signal Desktop v1.17.3 and loading times for the app are still far beyond acceptable. I use the app once every 2-3 days or so and everytime I start it up it takes more than half a minute, sometimes more than 3 minutes to load the messages. On the previous Chrome App, this was never and issue. I'm not sure what changed on the migration to Electron, but even though it is a known bloat-inducing framework, the performance drop could not have been that significant. There must be some remaining problems with the implementation.

@Sethur the chrome app would always run in the background whenever you have Chrome open. So even if you only use signal once every 3 days, as long as you used Chrome in between it would have time to keep up to date, hence the better user experience when finally opening the app. The standalone Electron app doesn't have this advantage.

However, even though the difference in experience is easily explained, I do have to agree that the current synchronization speed is still unacceptable if we ever want the masses to start using Signal. What is the current bottleneck anyway? Even on my 500/500 Mbit connection, 8 core/16 thread Ryzen processor, 16GB RAM and NVME SSD, I am only syncing around 10-20 messages a second. That's insanely slow for how small these messages are. Shouldn't we easily be seeing thousands of messages per second with current technology?

@Mushoz if you're really interested in the performance, I encourage you to watch the log (using the dev tools) during a big download some time. Most of the biggest delays are attachment downloads. At some point Desktop will download attachments out-of-band, which will help. But contact/group syncs will always need to be downloaded while processing the message.

Is there any reason why all attachments must be downloaded on app launch? Sounds terribly inefficient. What if one day you transferred a zip with 500mbs of photos to a friend over signal? Every time in the future you want to send a two word message to any of your contacts you have to download 500mbs?

Why not download upon request?

@Mushoz : You are, of course, right regarding the Chrome app running in the background all the time and thus circumventing the synchronization issues, I wasn't thinking about that.

@joaobarcia @scottnonnenberg : I just started Signal Desktop again after only one day of inactivity. None of my groups posted any images, besides standard emojis (not sure if they are send as unicode or images). There were altogether maybe 15 messages that needed synchronizing. Startup nevertheless took 18.3 seconds on a dual Xeon board with 32 GB and 20 cores (40 with hyperthreading) with a 1 Gbit/s (100 MB/s) internet connection. So I'd wager to say that attachment downloads are not the only problem with the current implementation.

Is it generally necessary to fully download attachments in order to decrypt the following group/contact messages? If this is not the case, I would suggest prioritizing the implementation of out-of-band attachment downloads (preferably even on-demand if the user choses so) right away. Many users will not tolerate Blender-like startup times for a messenger app, end-to-end encrypted or not. This is especially true for people that were using something like XMPP before. It just feels like a big step backwards.

@Sethur: I totally agree with your point.

Can you post your debug log?

(I'm not a Signal developer but @scottnonnenberg is probably tired of asking the same thing over and over.)

It was slow loading with 20 messages, now with some hundreds it is a nightmare. It seems there are many unitary requests each being around or over 100ms. Running on Fiber in Europe, my ping to 1.0.0.1 and 8.8.8.8 is 5ms. Using https://www.cloudping.info/ I see values between 26 and 346ms. Might eventually dig into code while waiting for data loading...

Extract of the logs

INFO  2018-12-09T16:42:54.535Z draw attention
INFO  2018-12-09T16:42:54.623Z Approving request for permission 'notifications'
INFO  2018-12-09T16:42:54.718Z SQL channel job 4678 (removeUnprocessed) succeeded in 140ms
INFO  2018-12-09T16:42:55.367Z SQL channel job 4680 (createOrUpdateItem) succeeded in 118ms
INFO  2018-12-09T16:42:55.604Z SQL channel job 4683 (updateConversation) succeeded in 80ms
INFO  2018-12-09T16:43:48.559Z Sending a keepalive message
INFO  2018-12-09T16:44:43.662Z Sending a keepalive message
INFO  2018-12-09T16:44:57.876Z Remove all notifications
INFO  2018-12-09T16:44:57.978Z SQL channel job 4685 (saveMessage) succeeded in 98ms
INFO  2018-12-09T16:44:58.135Z SQL channel job 4688 (updateConversation) succeeded in 149ms
INFO  2018-12-09T16:44:58.135Z Sending 1 read receipts
INFO  2018-12-09T16:44:58.235Z SQL channel job 4697 (createOrUpdateSession) succeeded in 93ms
INFO  2018-12-09T16:44:58.235Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]699
INFO  2018-12-09T16:44:58.545Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]699 200 Success
INFO  2018-12-09T16:44:58.654Z SQL channel job 4707 (createOrUpdateSession) succeeded in 104ms
INFO  2018-12-09T16:44:58.712Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]728 (unauth)
INFO  2018-12-09T16:44:58.875Z Update notifications:

I have just had another case of just one day of inactivity. When I came back, over 400 messages where sychronized. I do not seem to understand what constitutes a single "message" in signal, since there were definitely no 400 messages in all my contacts during that time. I would estimate the actual number to be lower than 30. Startup was again frustratingly slow and took nearly 80s when you include the time electron itself needs for launch. If I remember correctly, there have not been any images or documents that have been send while I last used the app, so this all came from text messages.

I can only continue to emphasize the importance of fixing this. Wide-spread user adoption will not happen with this kind of performance.

Corresponding debug log is in the attachments.

debug.log

@Sethur as far as I understand it, the concept of a message is an abstract thing. It can mean an actual text message, but it can also mean stuff like sending/receiving the time a message was sent, the time a message was received on the other end, and finally the time at which a message was read.

Basically anything that requires communication with the signal servers will constitute a message, not just the actual text messages. So the much higher message count when syncing than actual number of text messages is completely normal and unavoidable (just a confusing way of naming it to be fair).

The slow speed at which there messages are processed though, is really not acceptable for widespread adoption. I use my laptop during the week for work, but rarely use it during the weekend. The first launch of Signal on Monday usually takes minutes.

Still very slow in v1.19.0 on Linux. Already waiting for 10 minutes..

This is our central place for tracking load-time performance: https://github.com/signalapp/Signal-Desktop/issues/3010

I have also the same problems using 1.19.0 on Linux

This is still an issue, or became issue again after some time, since people reported it as solved. Windows 10 64 bit.
It is as if everything has been done in one single thread, GUI and message loading, GUI won't become functional before all messages are processed.
Anyhow, having to wait 700 messages to load before being able to use Signal is PITA.
Can you put this in background, and enable sending/receiving of messages plus access to contact list while old messages ones are being loaded?

Same Problem here, very annoying, thought Signal was a very good alternative to Whatsapp.
Win 10 Pro 1809, i7 8550u, 512gb SSD, 16GB ram

@scottnonnenberg @scottnonnenberg-signal I am unable to post in issue #3010

Could you please reopen said issue so I can add some additional information?

No. Create a new issue, and follow the template.

Was this page helpful?
0 / 5 - 0 ratings