signalapp / Signal-Desktop

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

Extremely slow after the latest update to 1.15.0, Windows. #2613

Closed silvium closed 5 years ago

silvium commented 6 years ago

Bug description

I'm not talking about the usual "Loading messages" that sticks around for minutes at launch. I gave up on that, i know it's a separate issue that needs probably $100 million to solve, since $50 million wasn't enough. I'm talking about Simply using it for what it was intended, chatting.

Steps to reproduce

  1. Select a contact and wait for up to 2 minutes for the messages to load
  2. Start typing a message
  3. Watch as it doesn't type random parts of your sentence, doesn't cache them and continues registering the last words of the sentence as if nothing was typed in the meantime.

Actual result:

Expected result: words type out correctly. And your mission to help people in "censored countries" to actually apply. They are poor. They don't have the development machines you do, on which everything works smoothly. So stop feeling good about yourselves for that. And make a version for featurephones, that's what they afford.

Screenshots

Platform info

Signal version: 1.15.0 Windows

Operating System:

Linked device version:

Link to debug log

stevesbrain commented 6 years ago

@scottnonnenberg-signal Have just tried the beta now; this does appear to fix the performance issues for me :) Thanks!

dongcarl commented 6 years ago

Looks like this should be closed?

vbspam commented 6 years ago

Please do not close it, my v1.16.1 is  still very slow. Is there update I should try? V

On 09/19/2018 12:44 PM, Carl Dong wrote:

Looks like this should be closed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/signalapp/Signal-Desktop/issues/2613#issuecomment-422752448, or mute the thread https://github.com/notifications/unsubscribe-auth/AXJvdZoN005pNFL7jUoBQ9ocODj47qjSks5uciApgaJpZM4VvS-r.

strotter commented 6 years ago

I'm upgrading from 1.16.0 to 1.16.1, will report back with debug results/reports.

scottnonnenberg-signal commented 6 years ago

@vbspam Another debug log and another detailed description of the slowness you're seeing (specific scenarios) would be very helpful.

vbspam commented 6 years ago

As soon as it will appear, I will report it. I am busy these days, but will do my best to stress signal to show the bug. Expecting it will show tomorrow or day after.

strotter commented 6 years ago

@scottnonnenberg-signal I haven't done the usual "clear data" to wipe/reinstall, but upgrading to 1.16.1 seems to have significantly helped the input and text lag. Can you point me to commits or code pieces that improved the performance? It might help me debug in the future.

scottnonnenberg-signal commented 6 years ago

@strotter Between 1.16.0 and 1.16.1, this was the key performance fix: https://github.com/signalapp/Signal-Desktop/commit/ea8e76d9de6ddb5566f440a6768ed2b2d785de9e. Instead of re-rendering messages whenever their associated conversation changed, only re-render when a conversation property the message actually cares about has changed.

remusao commented 6 years ago

@scottnonnenberg Thank you very much for your work. I can confirm that in my situation, the performance issue is now resolved and I cannot observe the slowness of typing anymore.

vbspam commented 6 years ago

Looks it is fixed on my laptop Ubuntu 16.04 Signal v1.16.2 . Thanks a lot!!!

TheCapsLock commented 6 years ago

Same performance issue here on NixOS 18.09.

Every time i type a message at least one CPU core goes by 100% usage. If y type a message, hit enter then start writing the next message immediately, some words are not catched and displayed in text input.

This is a huge regression from previous version (1.14 if I remember correctly)

U039b commented 6 years ago

Sometimes signal-desktop completely freezes, sometimes comes back to life after several seconds, sometimes not. Beyond the slowness, I have to kill and restart signal-desktop multiple times a day. That's really irritating especially on a 4 cores, 16GB of RAM and SSD laptop running Ubuntu.

nehresma commented 6 years ago

This is still very slow for me as well from time to time. Version 1.16.2. 100% CPU usage on one core (32 GB of RAM). Typically when it hangs, it spins for about 10 seconds but I've had it go as long as 30 seconds. Usually it'll happen when there are several incoming messages quickly. But last Friday it happened without incoming messages -- I was typing several messages quickly in a row when it decided to hang.

Here's a debug log: https://debuglogs.org/9968a08386c03f18a9674e245036dfdeb1b2a8d7fde58fa20631ce04cf59deec

FWIW, there was a hang that occurred sometime within the last 4 minutes of that debug log. I didn't think at the time to make a note of the exact time it happened. :(

nehresma commented 6 years ago

Looking closer at the debug log, this chain of events looks suspicious to me:

INFO  2018-10-15T14:32:22.862Z SQL channel job 62741 (saveMessage) succeeded in 140ms
INFO  2018-10-15T14:32:23.059Z SQL channel job 62742 (saveMessage) succeeded in 193ms
INFO  2018-10-15T14:32:23.059Z SQL channel job 62738 (saveMessage) succeeded in 209ms
INFO  2018-10-15T14:32:23.059Z SQL channel job 62739 (saveMessage) succeeded in 208ms
INFO  2018-10-15T14:32:23.059Z SQL channel job 62737 (saveMessage) succeeded in 210ms
INFO  2018-10-15T14:32:23.060Z SQL channel job 62743 (saveMessage) succeeded in 390ms
INFO  2018-10-15T14:32:23.080Z SQL channel job 62745 (saveMessage) succeeded in 405ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62749 (saveMessage) succeeded in 402ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62750 (saveMessage) succeeded in 402ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62751 (saveMessage) succeeded in 403ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62744 (saveMessage) succeeded in 406ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62746 (saveMessage) succeeded in 406ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62747 (saveMessage) succeeded in 406ms
INFO  2018-10-15T14:32:23.081Z SQL channel job 62748 (saveMessage) succeeded in 403ms
nehresma commented 6 years ago

It just happened to me again as I was typing a message. I had just received a message as well. Here's the debug log activity from 1 minute before it started until after the hang was over. The hang was happening from roughly 20:02:10 to 20:02:25 (ish). I didn't get the exact start/stop time. But that's roughly when it happened, give or take a few seconds.

INFO  2018-10-15T20:01:58.467Z SQL channel job 69825 (saveMessage) succeeded in 15ms
INFO  2018-10-15T20:01:58.469Z SQL channel job 69826 (getNextExpiringMessage) succeeded in 2ms
INFO  2018-10-15T20:01:58.470Z next message expires 2018-10-17T15:16:49.728Z
INFO  2018-10-15T20:01:58.471Z SQL channel job 69827 (getMessagesByConversation) succeeded in 3ms
INFO  2018-10-15T20:01:58.502Z Worker job 10777 (arrayBufferToStringBase64) succeeded in 1ms
INFO  2018-10-15T20:01:58.520Z SQL channel job 69828 (saveUnprocessed) succeeded in 18ms
INFO  2018-10-15T20:01:58.520Z queueing envelope +[REDACTED]189.4 1539633717372
INFO  2018-10-15T20:01:58.520Z delivery receipt from +[REDACTED]189.4 1539633717372
INFO  2018-10-15T20:01:58.545Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]158
INFO  2018-10-15T20:01:58.545Z SQL channel job 69830 (getMessagesBySentAt) succeeded in 1ms
INFO  2018-10-15T20:01:58.545Z Worker job 10778 (arrayBufferToStringBase64) succeeded in 0ms
INFO  2018-10-15T20:01:58.54INFO  2018-10-15T20:01:59.470Z next message expires 2018-10-17T15:16:49.728Z
5Z SQL channel job 69829 (removeUnprocessed) succeeded in 25ms
INFO  2018-10-15T20:01:58.595Z SQL channel job 69831 (saveMessage) succeeded in 48ms
INFO  2018-10-15T20:01:58.604Z SQL channel job 69832 (saveUnprocessed) succeeded in 74ms
INFO  2018-10-15T20:01:58.605Z queueing envelope +[REDACTED]189.1 1539633717372
INFO  2018-10-15T20:01:58.605Z delivery receipt from +[REDACTED]189.1 1539633717372
INFO  2018-10-15T20:01:58.606Z SQL channel job 69833 (getMessagesByConversation) succeeded in 35ms
INFO  2018-10-15T20:01:58.629Z SQL channel job 69834 (removeUnprocessed) succeeded in 24ms
INFO  2018-10-15T20:01:58.630Z SQL channel job 69835 (getMessagesBySentAt) succeeded in 24ms
INFO  2018-10-15T20:01:58.655Z SQL channel job 69836 (saveMessage) succeeded in 24ms
INFO  2018-10-15T20:01:58.657Z SQL channel job 69837 (getMessagesByConversation) succeeded in 3ms
INFO  2018-10-15T20:01:58.697Z PUT https://textsecure-service.whispersystems.org/v1/messages/+[REDACTED]158 200 Success
INFO  2018-10-15T20:01:58.716Z SQL channel job 69838 (saveMessage) succeeded in 15ms
INFO  2018-10-15T20:01:59.469Z SQL channel job 69839 (getNextExpiringMessage) succeeded in 2ms
INFO  2018-10-15T20:02:03.227Z trimming conversation +[REDACTED]189 of 17 old messages
INFO  2018-10-15T20:02:06.582Z unloading conversation group([REDACTED]j\) due to: inactivity
INFO  2018-10-15T20:02:26.164Z SQL channel job 69840 (getMessagesByConversation) succeeded in 9ms
INFO  2018-10-15T20:02:26.164Z SQL channel job 69841 (getNextExpiringMessage) succeeded in 9ms
INFO  2018-10-15T20:02:26.164Z next message expires 2018-10-17T15:16:49.728Z
INFO  2018-10-15T20:02:30.077Z Remove all notifications
INFO  2018-10-15T20:02:30.078Z SQL channel job 69842 (getUnreadByConversation) succeeded in 1ms
INFO  2018-10-15T20:02:31.077Z Update notifications: {"shouldClearNotifications":false,"shouldPlayNotificationSound":false,"shouldShowNotifications":false,"type":"noNotifications","isNotificationGroupingSupported":true}
INFO  2018-10-15T20:02:31.149Z Send pre-checks took 20 milliseconds
INFO  2018-10-15T20:02:31.171Z Sending message to conversation +[REDACTED]189 with timestamp 1539633751171
INFO  2018-10-15T20:02:31.205Z SQL channel job 69843 (saveMessage) succeeded in 21ms
INFO  2018-10-15T20:02:31.208Z SQL channel job 69844 (getNextExpiringMessage) succeeded in 3ms
scottnonnenberg-signal commented 6 years ago

@nehresma And what OS/version are you on? My guess: some Linux variant. I've heard of these kinds of periodic hangs mostly from Linux users.

nehresma commented 6 years ago

Ubuntu 16.04.

On October 15, 2018 4:56:54 PM Scott Nonnenberg notifications@github.com wrote:

@nehresma And what OS/version are you on? My guess: some Linux variant. I've heard of these kinds of periodic hangs mostly from Linux users.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

strotter commented 6 years ago

I'm in Ubuntu 18.04 and it still happens for me too, the same behavior as @nehresma.

It's very distinct from the previous performance issues (lag while typing intermittently repeatedly, but also steady stream of lag.) Those previous performance issues appear to have been fixed.

These spikes seem to happen more like every 10-15 minutes, or sometimes every 30-60 minutes. I don't recognize a pattern but the same thing happens to me, 100% CPU spike and the whole app hangs for up to 30-60 seconds. Full CPU spike for that long and I'm running a 4.2ghz 6700k CPU with 64GB DDR4.

Maybe worth noting that these long lag spikes also occurred intermittently with the previous issues that were fixed recently.

TheCapsLock commented 6 years ago

It's very distinct from the previous performance issues (lag while typing intermittently repeatedly, but also steady stream of lag.) Those previous performance issues appear to have been fixed.

Wrong on Linux. Everything is slow now since 1.15.0 ; everything is slow : typing a message, writing a message right after the previous one has been sent, messages takes sometimes more than 5 seconds to be shown whereas the Android app already have them....

TheCapsLock commented 6 years ago

It's very distinct from the previous performance issues (lag while typing intermittently repeatedly, but also steady stream of lag.) Those previous performance issues appear to have been fixed.

Wrong on Linux. Everything is slow now since 1.15.0 ; everything is slow : typing a message, writing a message right after the previous one has been sent, messages takes sometimes more than 5 seconds to be shown whereas the Android app already have them....

So we should rename this issue without Windows mention : The problem seems not to be platform related

scottnonnenberg-signal commented 6 years ago

@TheCapsLock Can you provide a little more information about how these things seem slow? For example, you mention 'typing a message' - is it that keypresses take a long time to show up? What exactly is it? I'd like to understand, very precisely, what is slow.

Debug logs are also very useful - the best would be if you went through your slow scenarios, capturing the time, and then provide a debug log from that time.

TheCapsLock commented 6 years ago

@TheCapsLock Can you provide a little more information about how these things seem slow? For example, you mention 'typing a message' - is it that keypresses take a long time to show up? What exactly is it? I'd like to understand, very precisely, what is slow.

Debug logs are also very useful - the best would be if you went through your slow scenarios, capturing the time, and then provide a debug log from that time.

Right after sending a message typing gets painful : it meeses some letters/words being typed; and it stays lagguish for 5-15 seconds.

You cannot send a series of messages without waiting the lag disappear after each message being sent

babilon commented 6 years ago

FWIW, I've not experienced performance related issues with the release version of signal desktop since the last time I posted. I'm currently using v1.16.3 on Linux Mint 19. uname -a: Linux purplerain 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

TheCapsLock commented 6 years ago

Seems performance issue is gone ; What I've done:

scottnonnenberg-signal commented 6 years ago

@TheCapsLock Why are you on such an old build? The latest is 1.17.0 and known performance issues have been fixed since then.

TheCapsLock commented 6 years ago

@TheCapsLock Can you provide a little more information about how these things seem slow? For example, you mention 'typing a message' - is it that keypresses take a long time to show up? What exactly is it? I'd like to understand, very precisely, what is slow.

Debug logs are also very useful - the best would be if you went through your slow scenarios, capturing the time, and then provide a debug log from that time.

I use the latest available on that distro ; waiting for the maintainers make latest version available.

stevesbrain commented 6 years ago

@TheCapsLock Sounds like the performance issues I was getting before the current (fixed) version was released. You could always update your release locally if NixOS are slow? Either way, that's an issue with the distro rather than Signal itself :)

vbspam commented 5 years ago

It returned in 1.17.3. Same symptoms, here is the log https://debuglogs.org/d95ed24d9374e2e624d6a292ada6517b0bc63c6823f66c0d300c024060dec2ee .

scottnonnenberg-signal commented 5 years ago

This is the primary issue tracking slow startup: https://github.com/signalapp/Signal-Desktop/issues/3010

vbspam commented 5 years ago

Still slow, I can't even type a word for seconds. It is like 90's PC XT MSDOS app performance.

https://debuglogs.org/3a111d0c509344d5a66e2ae87090121775c053ca579e2f5f5cd05c50473093f6

scottnonnenberg-signal commented 5 years ago

@vbspam What can you say about your computer's general situation while this is happening? An excerpt from your log is below - why do you think basic database calls are taking two or three seconds when they should be taking just a couple milliseconds?

INFO  2019-02-14T11:25:32.963Z SQL channel job 33408 (getSessionsByNumber) succeeded in 22ms
INFO  2019-02-14T11:25:33.128Z Worker job 666 (arrayBufferToStringBase64) succeeded in 0ms
INFO  2019-02-14T11:25:33.200Z Worker job 667 (arrayBufferToStringBase64) succeeded in 1ms
INFO  2019-02-14T11:25:36.509Z SQL channel job 33409 (saveMessage) succeeded in 965ms
INFO  2019-02-14T11:25:36.509Z SQL channel job 33411 (getSessionById) succeeded in 958ms
INFO  2019-02-14T11:25:36.510Z Worker job 668 (arrayBufferToStringBase64) succeeded in 1ms
INFO  2019-02-14T11:25:36.936Z SQL channel job 33412 (saveUnprocessed) succeeded in 3398ms
INFO  2019-02-14T11:25:36.937Z queueing envelope 48de5016-cd0a-4fb4-ae35-bf538817d9f9
INFO  2019-02-14T11:25:36.937Z SQL channel job 33413 (saveUnprocessed) succeeded in 3328ms
INFO  2019-02-14T11:25:36.937Z queueing envelope 82fe94af-44c4-4502-96a0-7994e90e9861
INFO  2019-02-14T11:25:36.937Z SQL channel job 33410 (getConversationById) succeeded in 3565ms
INFO  2019-02-14T11:25:36.937Z SQL channel job 33415 (getSessionsByNumber) succeeded in 2607ms
INFO  2019-02-14T11:25:37.159Z SQL channel job 33417 (createOrUpdateItem) succeeded in 2987ms
INFO  2019-02-14T11:25:37.160Z SQL channel job 33416 (getNextExpiringMessage) succeeded in 2999ms
INFO  2019-02-14T11:25:37.160Z SQL channel job 33414 (getConversationById) succeeded in 3018ms
vbspam commented 5 years ago

What can you say about your computer's general situation while this is happening?

Almost no load, listening internet radio, reading articles, openned qtcreator, vscode, chromium-browser (approx 20tabs). Memory 7GB RAM available (from 16GB).

No apparent network issues (connected through company wifi - which itself is connected to UPC fiber-optic business connection).

No intensive graphic application running.

vbspam commented 5 years ago

https://debuglogs.org/cb07da959aaa40b8ace84f30e0e85c0f03cf2703fae5fec64a7b75e7d5307ccb

scottnonnenberg-signal commented 5 years ago

@vbspam Please provide some context for that last log. Why did you post it?

vbspam commented 5 years ago

The delay/latency was so crazy high. I sent message and it took so long I got the impression that I typed it to another window (lost focus). When I typed and sent the message second time, after another long time, the message appeared twice as sent. It is not only me who is suffering this issue, the other party is just not technically fit to report bugs here. At least my friend in India (Windows 10) has the same issues and my wife (Ubuntu 18.04).

Unfortunately many (another 3 people) of my contacts complain about the Signal performance (slow, bad photo taking, receiving messages and lost calls too late in batches and occupying too much storage space) and trying to convince me to WA. It would be nice to get at least this fixed, unfortunately bug reporting is the only contribution I can provide right now.

strotter commented 5 years ago

@vbspam what version are you on? I'm on 1.21.2 and the issues are mostly gone for me now (I had previously commented back in September on this thread and I think it was version 1.15 that was the worst of them in terms of lag spikes.)

nehresma commented 5 years ago

I also reported on this back in October and the issues are mostly gone for me as well. Occasionally I'll notice a second or so of it being non responsive, but nothing like the 30 seconds I was seeing last fall. I am also on v1.21.2.

vbspam commented 5 years ago

My version is now v1.21.2. It updates automatically and if not updated, Signal stops working at all - btw this is also a bit not convenient, if one is conservative and waits for stable and proven releases.

vbspam commented 5 years ago

Could it be that I am with Signal on desktop since it was Chrome extension?

strotter commented 5 years ago

@vbspam I am on signal desktop in Linux and Windows without issue now. I believe the chrome extension is deprecated?

vbspam commented 5 years ago

Me too, I just wanted to mention,if it would help to identify the issue cause, that my account was created at the time and used through Chrome extension.

scottnonnenberg-signal commented 5 years ago

@vbspam Please reach out to me directly and we can get more detailed about all of this. Maybe you have a really huge database? Maybe something has gone wrong with your database? Either way, you're seeing what I would call really unusual behavior and I'd like to track it down.

vbspam commented 5 years ago

Thank you for your attention. I sent you email. I will try my best to help to find the cause, I am really curious what is it.

kiplingw commented 5 years ago

I am using 1.22.0. I confirm the same issue others are reporting above. Signal Desktop is unbearably slow. Not just to startup, but while doing anything with the GUI. I am using Ubuntu 18.10 (amd64). It seems as though people have already provided debug logs to no avail.

scottnonnenberg-signal commented 5 years ago

@kiplingw This issue is about windows. Please enter a new bug. You do seem to be encountering a new behavior, where interaction in the UI is slow instead of just startup.

kiplingw commented 5 years ago

Hey @scottnonnenberg. I see that. I'd suggest considering amending the issue caption because there there are a number of reports above on GNU/Linux systems.

vbspam commented 5 years ago

Or move to another messaging service. I tried my best to test my laboratory environment, unfortunately this bug is so unpredictable and hard to reproduce on demand, so I decided to move to another solution. I am still observing this issue and kept my accounts active, but it reached the level of annoyance for my family that we moved away.