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

Signal takes a long time to show a conversation #1089

Closed
1 task done
jocelynthode opened this issue Mar 14, 2017 · 35 comments
Closed
1 task done

Signal takes a long time to show a conversation #1089

jocelynthode opened this issue Mar 14, 2017 · 35 comments

Comments

@jocelynthode
Copy link

jocelynthode commented Mar 14, 2017

  • I have searched open and closed issues for duplicates

Bug description

When using Signal Desktop on Archlinux with Chromium, Loading messages sent when the desktop client was online takes a long time. On the same computer under Chrome on Windows 8.1, loading is almost instantaneous.

It is really slow when I haven't opened the desktop client in a few days (no problem on windows) as if it was taking a long time to go through all dates.

Steps to reproduce

  • Write messages in conversations while Desktop client is offline
  • Start desktop client
  • Wait for the messages to be received

Actual result: new messages take a long time to be displayed
Expected result: It should be as fast as on Windows

Platform info

Operating System: Linux cyborg 4.10.1-1-ARCH #1 SMP PREEMPT Sun Feb 26 21:08:53 UTC 2017 x86_64 GNU/Linux
Browser: Chromium Version 57.0.2987.133 (64-bit)

Signal version: 0.34.0

Link to debug log

https://gist.github.com/1d435e80d5d24d77ab7df725cfeffce3

@jocelynthode
Copy link
Author

jocelynthode commented Apr 15, 2017

I added a debug log if it can be of any help

@TurkeyMan
Copy link

I experience this problem on all my clients; Win10, Ubuntu, Arch. OS doesn't seem to be a significant factor.
All take a very long time to display the conversation when the program first loads and on selecting to view each conversation for the first time. After first view, message history appears to be cached for the life of the process, but startup time is becoming a serious problem.

It appears to be getting worse as the length of my conversation histories grows with use. Conversations with short history display much faster than conversations with long history.

@jocelynthode
Copy link
Author

I created a debug log under Win8 where I don't have any problem.

https://gist.github.com/anonymous/7f0adfed3742ca81c6bda2df6f1d9a73

@hacktivateit
Copy link

hacktivateit commented Jun 8, 2017

I'm also experiencing this problem, it's really annoying

By reading my log i have a recurring error:

2017-06-08T19:01:25.820Z Failed to create or send message Error
    at ajax (chrome-extension://bikioccmkafdpakkkcpdbppfkghcmihk/js/libtextsecure.js:37607:25)
    at TextSecureServer.ajax (chrome-extension://bikioccmkafdpakkkcpdbppfkghcmihk/js/libtextsecure.js:37653:20)
    at TextSecureServer.sendMessages (chrome-extension://bikioccmkafdpakkkcpdbppfkghcmihk/js/libtextsecure.js:37831:25)
    at OutgoingMessage.transmitMessage (chrome-extension://bikioccmkafdpakkkcpdbppfkghcmihk/js/libtextsecure.js:38770:28)
    at OutgoingMessage.<anonymous> (chrome-extension://bikioccmkafdpakkkcpdbppfkghcmihk/js/libtextsecure.js:38810:25)
    at <anonymous>

i don't know if it's related

@derWalter
Copy link

Same here
Chromium Version 60.0.3112.113 (Developer Build) Built on Ubuntu , running on Ubuntu 17.04 (64-bit)

@scottnonnenberg
Copy link
Contributor

The latest version of the app has new logging which tracks the open time for each conversation. If you're still having this problem, I'd love some new logs. Thanks!

@sylvaticus
Copy link

sylvaticus commented Sep 20, 2017

Actually on me it worsted.. now, every-time I move from one conversation to another one is taking ages.. even if I did already opened that conversation 1 minute earlier..
(how can I update my signal web version ? I'm not into chrome extensions..)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36 Signal-Desktop/0.43.4

@scottnonnenberg
Copy link
Contributor

@sylvaticus That's already the most recent version - please send a debug log and we can dig in!

@dboonz
Copy link

dboonz commented Sep 21, 2017

@scottnonnenberg
Copy link
Contributor

@dboonz Can you provide a little more information about what you're experiencing? That log indicates to me that you only loaded one conversation and it took 675 milliseconds to load. What exactly seemed slow to you?

@dboonz
Copy link

dboonz commented Sep 21, 2017 via email

@scottnonnenberg
Copy link
Contributor

@dboonz I see what happened. This issue is mostly about how long it takes to load a single conversation. It sounds like you're worried about how long it takes to load the application up initially. How high did you see the number go when you started up, and how long did it take?

@dboonz
Copy link

dboonz commented Sep 21, 2017 via email

@sylvaticus
Copy link

@scottnonnenberg here it is.. https://gist.github.com/fa422595b844c2dbc642fc33e4305f7b

As you can see, it takes often more than 10 seconds to load the conversation..
I was a bit excessive on my previous comment.. if I reload to the conversation "1 minute later" than I got loaded it instantaneously.. but it seems there is a time limit that after it the conversation become slow loading again...

@jocelynthode
Copy link
Author

jocelynthode commented Sep 23, 2017

Hey @scottnonnenberg. Here is a recent log for me. I loaded around 200 messages. It took multiple minutes (2-3min) to do so before I could actually write one.

https://gist.github.com/anonymous/c21e0982439eac935089f2df8ccb1e96

Edit: I might have not been clear in my first post but I was never talking about loading a single conversation. It was always just loading all conversations before the application could be used, so I guess @dboonz does experience the same issue.

@kousu
Copy link

kousu commented Sep 26, 2017

I'm experiencing this too.

Steps to reproduce

  • Boot computer
  • Start Signal Desktop

Actual result: Signal takes a long time to load. It counts up "Loading messages. #0 so far..." in blocks of 10. Each block of 10 takes at least 5 seconds. It sort of seems like it's decrypting each message.
Expected result: Signal should load immediately and I should be able to see my conversation list.

I tried running window.location.reload() in background.html like @scottnonnenberg suggested in the other thread, and upon doing that signal immediately reloaded with no lag. It also does not happen if I close and reload Chromium.

It happens the first time after booting my machine, and if I close Chromium, receive some messages (on my phone), and reopen it. This maybe points to the error being something to do with downloading new messages? The length of time I have to wait before the UI displays seems to be correlated with how many messages it has to receive, but the numbers it counts up are always larger than the number of messages it needs to process (e.g. 5 new messages => it counts to about 70, 40 new messages => it counts to about 260).

Why does Signal need to load messages at all before showing the UI? Can't it load them on-demand?

Platform info

Operating System: ArchLinux 64bit
Browser: Chromiium Version 61.0.3163.91 (Developer Build) (64-bit)

Signal version: 0.43.4
Processor: Intel(R) Atom(TM) CPU Z3735F @ 1.33GHz

Interestingly, this doesn't happen on my other machine, which has an i5. That machine might also have hardware accelerated crypto though, or something. I am not sure where to look for that.

Link to debug log

https://gist.github.com/kousu/c8aec1935994cf34573d928e37fce1a0

@scottnonnenberg
Copy link
Contributor

@kousu Thanks for the report. I'd guess that the reason your other computer is not showing this behavior is because it's on an older version. The loading screen was introduced in 0.42.0.

Anyway, we're absolutely looking for ways to make things faster. And perhaps also load messages without hiding it behind the loading screen (note: sending messages during this background-loading process could cause conversations to be out of order).

@kousu
Copy link

kousu commented Oct 1, 2017

Oh, you're totally right: I just booted my other computer and it counted to 940 before showing me anything. I guess it updated in the background last time I had my machine on.

Debug log: https://gist.github.com/anonymous/da8c65e1dd9dea0aa257e0d255546858

Thanks for caring about this! I really appreciate that the Signal team cares about UX.

@breznak
Copy link

breznak commented Dec 28, 2017

I'm still experiencing this bug, on a reasonable hw (ssd, i7) loading some 1000+ messages takes nearly ten minutes wait-time on the loading screen till I can start working with the app.
Are other people not hitting the bug, or they just don't have that many msgs?

Can someone give a high-level explanation, why the messages take that long to load? They are cached on disk, right?

@snazzle
Copy link

snazzle commented Dec 31, 2017

just chiming in with a #metoo, this has been going on with Signal for a long time since downloading the Chrome addon and migrating to the standalone windows. I think, at least for me, it's something to do with the size of one cache of messages. I have one friend that I exchange messages with all day long, hundreds if not thousands, and loading the desktop app and synching with these messages takes an inordinate amount of time. I don't know if it's constrainted by Signal's resources (synching the Android version with Windows, and whatever amount of cloud resources it takes for that) or what, but I know my rig/SSD should be able to handle this type of process easily enough.

@scottnonnenberg scottnonnenberg changed the title Signal takes a long time to display conversation history Signal takes a long time to show a conversation Jan 2, 2018
@scottnonnenberg
Copy link
Contributor

@breznak @snazzle I just updated the title of this bug to better reflect its focus: the time it takes to load an individual conversation. It looks like both of you are interested in improving the message sync time, because you see the 'XX messages so far...' screen for too long on startup. This is the issue we're using to track that screen: #1442

@jocelynthode
Copy link
Author

here is a debug log from my windows app loading 400+ messages if it any help: https://gist.github.com/anonymous/af08398e1d9cb27a3025fd85c2fd444e

@scottnonnenberg
Copy link
Contributor

@jocelynthode I took a look at your log, and saw only a few times loading took more than a second:

INFO  2018-01-02T15:25:38.423Z websocket open
INFO  2018-01-02T15:25:44.731Z MessageReceiver: emitting 'empty' event
(6 seconds)

INFO  2018-01-06T13:12:04.130Z websocket open
INFO  2018-01-06T13:12:19.072Z MessageReceiver: emitting 'empty' event
(15 seconds)

INFO  2018-01-14T11:20:08.096Z websocket open
INFO  2018-01-14T11:20:19.609Z MessageReceiver: emitting 'empty' event
(11.5 seconds)

Does that match up with your perception?

@jocelynthode
Copy link
Author

This was on windows and thus it didn't feel slow at all. On my Linux partition so many messages would takes minutes to load.

@MartinX3
Copy link

MartinX3 commented Jan 16, 2018

I have 4 Chats, each contains 500 messages (I use the build in limitter, I hope, the deletion of messages gets synced to the desktop app)

It tooked 5 seconds to open the chats
It got slower since I got the Meltdown patch, I think...
But sometimes it takes even longer than only 5 seconds.

I only use it on Ubuntu Mate 17.10 x64

https://gist.github.com/fec7e5bc76f1ad3bbc809c117b23c210

@scottnonnenberg
Copy link
Contributor

@MartinX3 The deletion of messages is not synced to the desktop app. If you set up disappearing messages, that setting is sync'd and handled on desktop.

@jhargis
Copy link

jhargis commented Dec 19, 2018

wait_for_your_sekrets

@scottnonnenberg-signal
Copy link
Contributor

This is our central startup performance issue: #3010

@Jivix-zz
Copy link

Definitely not solved, I found this issue while trying to research why Signal takes so long to start up on desktop. I have an SSD and hex core cpu and it can take almost a minute to launch, and I only have about 400-500 messages in my cache. Heaven help me if I decide to use Signal for dedicated communication and not just the occasional message.

@scottnonnenberg-signal
Copy link
Contributor

@Jivix-zz Your best bet for helping us improve performance is providing your debug logs after a particularly long startup. There's one known thing which can make startup slow (contact syncs) but perhaps there's something unique to your setup making database or disk calls slow down? The log will provide that detail.

@Jivix-zz
Copy link

Jivix-zz commented Aug 28, 2020

Sure, sorry I hadn't thought of looking for logs. Here was the particularly long boot. Today it only took 30 seconds for some reason which isn't too bad.

log.log.1.zip

Edit 9/3/20 - Just got a Signal update, now it seems the behavior was changed, it just says "Loading" instead of "Loading Messages" and it is much faster. Problem solved???

Edit 3/8/21 - Nope, still takes a long time to start. My computer can open a complex model in SolidWorks faster than it can launch Signal.

@kousu
Copy link

kousu commented Sep 22, 2020

I still had this. It was only noticeable on a duo-core machine with 2G of RAM; on a Thinkpad, it's not noticeable. I also didn't think to grab logs. I got frustrated and did rm -r ~/.config/Signal and relinked that device, and now it's fast again -- because it barely has any history synced.

When my history gets longer and it gets laggier again I'll grab logs.

@alexpghayes
Copy link

This is increasingly noticeable for me on an older laptop running windows. Startup time for Signal is now over a minute consistently.

@nixsee
Copy link

nixsee commented Mar 7, 2021

How is this still an issue, 3+ years later? It takes a couple minutes for my Signal to load on Windows 10

@Kevin-Boardley
Copy link

Just installed Signal message n Win 10 desktop very few messages instances displaying there (approx 20) most with no conversation at all. I get the loading messages splash as well. This does not appear to be solved as an issue.

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

No branches or pull requests