desktop
desktop copied to clipboard
CPU usage of "Mattermost Helper" on Mac Desktop app spikes with animated GIFs in view on Mattermost
I confirm (by marking "x" in the [ ] below):
- [x] This is not a feature idea. Feature ideas go here: http://www.mattermost.org/feature-ideas/
- [x] This is not a troubleshooting question. Troubleshooting questions go here: http://www.mattermost.org/troubleshoot/
- [x] This is a product defect issue that can be reproduced using the steps listed below.
- [x] I have read CONTRIBUTING.md.
Jira ticket: https://mattermost.atlassian.net/browse/MM-14109
Summary
CPU usage of "Mattermost Helper" on Mac Desktop app spikes with animated GIFs in view on Mattermost
Steps to reproduce
On Mac OS X 10.10.5 using Mattermost Desktop app 1.2 and Mattermost server 3.2 (master) paste multiple animated GIFs in Mattermost channel and notice CPU utilization of "Mattermost Helper"
Expected behavior
CPU usage should not be extraordinarily high
Observed behavior
CPU usage can spike as high as 66% when animated GIFs are visible, but falls back to normal in channels without animated GIFs.
Possible fixes
If you can, link to the line of code that might be responsible for the problem.
It appears the issue is fixed with Mattermost v1.3. I'll confirm and send a reply back here with the conclusion.
Circling back -- this should now be fixed.
Closing as it cannot be reproduced in desktop app v1.3. Will be re-opened if the issue reappears.
We have received reports that this is still reproducing on Mattermost desktop version 1.3 (and on master
).
However, the performance appears to be better than on 1.2.
We should consider options to improve performance in a future release
It seems that having a channel open in Mattermost that has a visible GIF uses CPU even if the user is on another virtual desktop, on Linux. GIFs should only be running if the window is visible to the user.
Thanks for the note @tmcguire!
@yuya-oc, does it sound like a performance improvement on the desktop app or on the Mattermost server?
@yuya-oc Wondering if you could test on Mac whether posting multiple GIFs into a channel still spikes the CPU usage of "Mattermost Helper"?
Also wondering if https://github.com/mattermost/desktop/issues/215 reproduces anymore.
If not, I can go back to the submitter and ask whether they've seen either one since the 3.5 release.
I haven't heard reports of high CPU usage in a while + it's been fine on my end. Closing.
I am seeing this again in OSX desktop client v3.6.0. There is a single animated :clapping: (custom) emoticon.
Moving into chat windows without animated emoticons sees the cpu usage drop to nominal values.
Thanks @jsas! Can you help download the latest desktop app version (v4.1.2) and see if it reproduces?
You can download the latest version here.
You bet. Same in 4.1.2.
Thank you!
@yuya-oc Is there any additional information that would be useful in this case?
@jsas Are you able to replicate this behaviour on Google Chrome, or does it only reproduce on the desktop app?
Same in Chrome underpinnings (68.0.3440.106).
I guess this is related to (among a slew of others) https://bugs.chromium.org/p/chromium/issues/detail?id=671138&q=cpu%20animate%20gif&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified
Although the effects do seem amplified in the desktop client, if that even makes any sense.
This is really helpful, thanks @jsas! Apart from the CPU spike, are you noticing it's causing the app itself to slow down?
I have a Windows user on my server (5.7.0, Team edition) complaining that he has to kill his desktop client at least three times a day due to CPU usage spikes. On Linux, with the latest desktop application (but with previous ones as well), I also regularly observe CPU load higher than 10 to 20%. I don't know if this is related to animated images or emoticons, I believe the load is high even when no such images are displayed.
Ticket: https://mattermost.atlassian.net/browse/MM-14109
Is there any news on this? The issue still stands as of May 2019, and I don't know about Mac but I can confirm CPU usage can be high for both Windows and Linux clients. It's not literally spikes, but 10-20% seems a lot with current CPUs, and Mattermost-client is the most CPU-demanding process when I use my Linux computer for regular use (web browser, IDE, LibreOffice, H.265 videos, etc.).
[Edit] This is not the most striking example since it's only 4.7% here (still something), but one of my users running Windows sent me this:
Général - Lamouze is our main channel, and this is the one where we have some animated gifs. Not sure about the other lines, but the channel with gifs doesn't seem to be the main issue.
To bring grist to the mill:
The same Windows user sent me this today:
At the exact same moment, my CPU use with the Linux client was spiking too:
Or, another day:
Not shown on these screenshots for Linux, but this varies quite a lot and can be worse than that with up to 80% CPU use.
I believe this may relate to videos (or other URLs?) being linked in the channel. The videos are not playing, I just have the previews thumbnails shown, however /collapse
does not solve the issue for the Windows client or the Linux client so the previews are probably not the problem. The only solution for the Windows user was to close the client and restart it (I guess because then the URLs to videos will not be shown directly in the history, but rather in the "older messages"). On my side, with the Linux client, this did not help although the videos URLs are hidden in "older messages".
Unfortunately, this kind of CPU levels are making it hard for me to make my users use Mattermost, they want to quit the server and use an alternative, which to be honest can be understood when the CPU use exeeds 65% (my screenshot). This is a shame because I really want our team to keep using open source and self-hosted software, I am very satisfied with Mattermost and want to stick to it, but would need a solution for this bug.
This may be a webapp
issue rather than a desktop app issue and may need to be moved to that repository. See my comment here.
There doesn't initially look like much difference between accessing a server through a conventional web browser vs. through the desktop application which is also just making a web request to the server and loading it into a webview
.
Watch the processes on your web browser when accessing the chat server. I suspect you'll observe the same behavior.
I would just like to mention the small detail that setting an animated user status naturally leads to an animated GIF always being displayed, which means that the CPU load of the renderer is constantly at 20% (instead of 0.x%). I was wondering why Mattermost was using CPU unnecessarily and had to find out that my user status was responsible for it. So avoiding animated user status is another workaround to prevent high CPU usage.
I would like to have a feature to disable animation at all. It will solve the issue.
https://mattermost.uservoice.com/forums/306457-general/suggestions/34520716-ability-to-disable-rendering-of-animated-emoji-or
I would like to have a feature to disable animation at all. It will solve the issue.
This would also just stop distracting oneself while having a chat window incl. an animation left open on another screen.