Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App extremely slow to "Load messages" on macOS desktop #1990

Closed
arikroc opened this issue Jan 21, 2018 · 115 comments
Closed

App extremely slow to "Load messages" on macOS desktop #1990

arikroc opened this issue Jan 21, 2018 · 115 comments

Comments

@arikroc
Copy link

arikroc commented Jan 21, 2018

v1.1.0

macOS 10.13.2

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

Yes I've searched. This is very similar #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.

@scottnonnenberg
Copy link
Contributor

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

@Dyras
Copy link

Dyras commented Jan 26, 2018

@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.

@scottnonnenberg
Copy link
Contributor

@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?)

@ghost
Copy link

ghost commented Feb 24, 2018

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

@Raphus89
Copy link

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.

@Dyras
Copy link

Dyras commented Feb 26, 2018

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"

@tomap
Copy link

tomap commented Mar 7, 2018

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

@scottnonnenberg
Copy link
Contributor

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

@GhostofGoes
Copy link

GhostofGoes commented Apr 3, 2018

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.

@maciekChmura
Copy link

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

@tomap
Copy link

tomap commented Apr 14, 2018

With latest version, no more issue.
Thank you

@GhostofGoes
Copy link

Latest version fixed the issue on Windows as well!

@Dyras
Copy link

Dyras commented Apr 15, 2018

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 ;)

@scottnonnenberg-signal
Copy link
Contributor

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?

@Dyras
Copy link

Dyras commented Apr 16, 2018

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.

@ideologysec
Copy link

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?

@scottnonnenberg-signal
Copy link
Contributor

@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.

@sommarnatt
Copy link

@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..

@bajtos
Copy link

bajtos commented Apr 27, 2018

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.

@gasi-signal
Copy link
Contributor

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.

@lebedkin
Copy link

lebedkin commented Jun 8, 2018

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...

@ideologysec
Copy link

ideologysec commented Jun 11, 2018

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!

@Dyras
Copy link

Dyras commented Jun 11, 2018

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

@lebedkin
Copy link

lebedkin commented Jun 11, 2018 via email

@jcollum
Copy link

jcollum commented Jun 16, 2018

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.

@joaobarcia
Copy link

joaobarcia commented Jun 18, 2018

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

@scottnonnenberg-signal
Copy link
Contributor

@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.

@joaobarcia
Copy link

@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

@GhostofGoes
Copy link

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.

@scottnonnenberg-signal
Copy link
Contributor

@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.

@sivaraam
Copy link

sivaraam commented Sep 1, 2018

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

@Mushoz
Copy link

Mushoz commented Sep 4, 2018

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?

@scottnonnenberg-signal
Copy link
Contributor

@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?

@butla
Copy link

butla commented Sep 4, 2018

@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?

@scottnonnenberg-signal
Copy link
Contributor

@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
Copy link

sivaraam commented Sep 8, 2018

@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.

@ckujau
Copy link

ckujau commented Sep 11, 2018

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!

@scottnonnenberg-signal
Copy link
Contributor

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

@ckujau
Copy link

ckujau commented Sep 13, 2018

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

@scottnonnenberg-signal
Copy link
Contributor

@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.

@Sethur
Copy link

Sethur commented Dec 5, 2018

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.

@Mushoz
Copy link

Mushoz commented Dec 5, 2018

@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?

@scottnonnenberg-signal
Copy link
Contributor

@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.

@joaobarcia
Copy link

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?

@Sethur
Copy link

Sethur commented Dec 6, 2018

@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.

@leonardehrenfried
Copy link

@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.)

@mulder999
Copy link

mulder999 commented Dec 9, 2018

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:

@Sethur
Copy link

Sethur commented Dec 12, 2018

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

@Mushoz
Copy link

Mushoz commented Dec 12, 2018

@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.

@praetp
Copy link

praetp commented Dec 26, 2018

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

@scottnonnenberg-signal
Copy link
Contributor

This is our central place for tracking load-time performance: #3010

@4mig4
Copy link

4mig4 commented Jan 14, 2019

I have also the same problems using 1.19.0 on Linux

@d-3-n
Copy link

d-3-n commented Jan 28, 2019

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?

@phs92
Copy link

phs92 commented Jan 29, 2019

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

@Mushoz
Copy link

Mushoz commented Feb 21, 2019

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

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

@scottnonnenberg-signal
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests