-
Notifications
You must be signed in to change notification settings - Fork 109
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
Very high cpu load while using webclient #39
Comments
Same problem with Ubuntu. High CPU usage by 105-110 %. After closing that threema web app tab it is going down to the regulat 1-8 %.... Ubuntu 16.04 LTS (64bit) |
Same issue here on OSX 10.11.6 with Firefox 51.0.1, but only in the messaging/chat view. As soon as I return to the overview of contacs with their last messages, CPU usage drops to almost normal levels. |
Same issue on Windows 10 with 56.0.2924.87 (64-bit) (only in the messaging view) |
dupe of #20 (or at least closely related) |
Some details for this issue on FF 51.0.1 on Win7: The CPU load goes only up to 100%, when chat/messaging view is open. Javascript debugger "pause" button stops repeatedly in Call stack:
Hope this helps. |
Thanks @fichtennadel! That made me take a closer look at the profiler again, and I think I found the cause of the high CPU use this time :) |
In case someone wants to test, the |
Can't test the branch, but after reading the description of the fix, I had the idea to remove all the progress bars by scrolling up the history to the top: After the top circle vanished, CPU load goes down. |
The fix from #117 is now live on https://web.threema.ch/, as of v1.0.4. Would be good to get some feedback from @fichtennadel @meyerjo @2b-as @offlinehoster @rohlandm @rugk on whether the CPU load is fixed or at least greatly reduced. |
Firefox: CPU load still starts going up once a conversation is being opened ~40%. When the conversation is being closed, it goes down immediately to ~idle%. I can send you a profile if you want me to. |
Firefox / OSX: I can confirm what @lgrahl said. CPU usage now 40% instead of 100% in conversation view. |
@2b-as do you habe a lot of thumbnail images in this conversation? |
@sillych Number of images doesn't seem to have any influence on CPU load |
@2b-as thanks!
|
For me it's a bit better than before: load at about ~15% instead of 50%, but the difference to lgrahl is probably just the display value, it's the same order of magnitude.
Same for me (modulo % load as above). My guess is, it's related to the number of unloaded items and/or images: if I scroll upwards to the top, and repeat to do so as long as the circle on the very top still circles until the one on the top vanishes, load is down to idle.
Couldn't reproduce this. What about removing the turning circles temporarily by something static? Just to be sure they are the problem. |
I can confirm that with 1.0.4 the load while scrolling through a conversation is between 5 and 15% and close to zero if left alone. |
Currently it looks good on Ubuntu Linux with Firefox. |
When I click on a contact and the conversation is loaded, the CPU load is sometimes up to ~90 %. Is this normal? (Using Firefox 51.0.1; Lubuntu 16.04) |
@ovalseven8 During the loading, or even after everything has been loaded for a while? |
During the loading. |
Yes, that is currently expected. AngularJS does a lot of things in the background (many watches being fired at the same time, some animations being calculated). As always, frameworks give us big advantages, but also have their downsides. Performance is one of the downsides for Angular. We'll probably tackle #40 some time in the future, that should help a lot. If someone has experience optimizing AngularJS 1 applications: Pull requests are welcome :) |
Unfortunately, I can't help here. :( And I am sure you know all the interesting posts about AnulgarJS performance already ;) |
Yep, numbers 1, 2 and 5 are what we are trying to improve in #40 :) |
To me it seems manually painting the "loading" circle in JS causes the load. What about using a gif image instead? |
Which one, the one that appears when loading older messages? That's not animated with JS anymore, it's now pure CSS. There are still some animated through JS though, namely the ones that appear on a thumbnail when downloading a file. That's still on my TODO list. |
I don't know, I just see that FF load is up to 20% (Chrome a little bit better: 8%) until I do once a full scroll up to the very first message. So I guess this must be related to the "unvisited" messages, because as soon as I reach the start of the chat, load is <1% in both FF and Chrome. Can you reproduce this? |
Slight improvement with release 1.1.0, but load still constant at ~8% in FF until I do the "scroll up/down workaround" Can anyone else confirm this "scroll up/down workaround"? Maybe this gives a hint to the cause of the load issue. |
Yes, the "scroll up/down workaround" also works for me. |
Fun story: microsoft/vscode#22900 (was #1 on Hacker News yesterday). Seems that CSS animations really are implemented quite inefficient. We should probably replace the loading spinner with an old fashioned GIF. |
+1 for the old fashioned GIF, at least you could give it a try if it's better than CSS in our case |
Same problem here with Firefox 52 64bit under Linux, CPU around 50% constantly. |
How long can this take to fix? Even those others are able to provide an own app for example with much lower cpu usage than Threema. I mean...using Threema would be much more efficient if the cpu would not consumpt over 50% to sometimes 100% of cpu power and so off batterytime… |
@offlinehoster While I understand your concern, your posting is not constructive. However, I agree that this bug should take high priority. |
I totally agree with you @lgrahl , but what else could i do as a simple Threema user to get back to the table and talk about my bad user experiences? sry for the (cpu fan) noise. |
I'd say penetrant pinging in the issue is fine. 😉 Which is what we're doing right now. |
As a workaround you can use Chrome for now, where the CPU consumption isn't that bad. We're aware of the issue, but with limited manpower setting development priorities is hard :) At least the GIF / spinner issue should be fixed in one of the next 1 or 2 releases, that might already help. Help is always welcome of course. |
By the way, in current Firefox Nightly Threema Web barely uses 1% of CPU when idle. The animation is still executed though, but runs at 60 fps. So it seems that they fixed the performance bug of simple animations using 10% CPU. |
#264 was just merged. Tests of current master are welcome :) (It's a simple |
The fix from #264 is now deployed in Threema Web 1.4.0. Is CPU load still an issue? |
Firefox CPU load while in conversation view: ~ 5%
Firefox CPU load if not in conversation (where the contacts are listed):
~ 0.5%
So, much better than before.
…On 20.07.17 11:40, Danilo Bargen wrote:
The fix from #264 <#264>
is now deployed in Threema Web 1.4.0.
Is CPU load still an issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADM1GFVrCNdq_trCDhtg4vx-igqaUA8Aks5sPyChgaJpZM4MCZB->.
|
BTW: If you need to want to use a better thing instead of the gif spinner, maybe use the new format APNG… It is quite widely supported – at least for the browsers you can support, because of WebRTC. |
Yes, but in that case a lot of things are happening at the same time, so (at least currently) it's expected. Speeding up the loading of conversations is planned. Among other things, #273, #272, #40 and others should also improve the situation. Will close this for now, since the main problem (high load even when idle) should now be solved. |
While using the web client, I have a very high CPU load, using both Google Chrome and Vivaldi (Chromium based). I have attached a screenshot of the chrome task manager:
This issue hinders me from using the web client in a "normal-use scenario", keeping it open in a pinned tab.
Edit:
I use Ubuntu 16.10 on a Dell XPS 13 (9360)
The text was updated successfully, but these errors were encountered: