signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.61k stars 2.66k forks source link

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

Closed arikroc closed 5 years ago

arikroc commented 6 years ago

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.

scottnonnenberg commented 6 years ago

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

Dyras commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

GhostofGoes commented 6 years ago

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 commented 6 years ago

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

tomap commented 6 years ago

With latest version, no more issue. Thank you

GhostofGoes commented 6 years ago

Latest version fixed the issue on Windows as well!

Dyras commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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:

gasi-signal commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

lebedkin commented 6 years ago

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 .

jcollum commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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

knokelmaat commented 6 years ago

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!

apphancer commented 6 years ago

Same problem here https://debuglogs.org/9dfbc3596194cd7c6ea3af9c22e27ab65f72cdddd0f804fd385b7017aec24f04

scottnonnenberg-signal commented 6 years ago

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

apphancer commented 6 years ago

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

markshep commented 6 years ago

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.

scottnonnenberg-signal commented 6 years ago

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

apphancer commented 6 years ago

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

scottnonnenberg-signal commented 6 years ago

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

mer-at commented 6 years ago

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
scottnonnenberg-signal commented 6 years ago

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

knokelmaat commented 6 years ago

@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 commented 6 years ago

i did delete almost everything yesterday, so only about 100 messages remain. still takes more than 1 minute to load. win10 log: https://debuglogs.org/7dbcb18154f5828929a7fe566d499a5778bd560f0f45bd63aa4a2061403e7669 android log: https://debuglogs.org/eda4688ec2646e679cb6be0d5a28d00985533b307b087999766e9c7ccde3feaf debian log: https://debuglogs.org/f03541999fb3ee791a8931298121695a3f3aaa99526eba97e1c5ee9925b82d9d

scottnonnenberg-signal commented 6 years ago

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

mer-at commented 6 years ago

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.

joaobarcia commented 6 years ago

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!

scottnonnenberg-signal commented 6 years ago

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

knokelmaat commented 6 years ago

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

outadoc commented 6 years ago

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

scottnonnenberg-signal commented 6 years ago

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

outadoc commented 6 years ago

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