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

OS X native client CPU usage spikes when avatars have animation #1281

Closed
PRI-mcallen opened this issue May 20, 2016 · 21 comments
Closed

OS X native client CPU usage spikes when avatars have animation #1281

PRI-mcallen opened this issue May 20, 2016 · 21 comments

Comments

@PRI-mcallen
Copy link

Your Rocket.Chat version: Version 1.3.1 (15)

We have a lot of users with animated avatar gifs (for better or worse). Using the native OS X client I notice that my CPU usage spikes to 100% and battery drops quickly if I'm in a channel with these animated avatars. If I got to a channel without them, CPU usage is normal. This CPU hit makes the native client barely usable. Typing starts to noticeably lag, for example.

The web client is better, but anecdotally I see 20-30% CPU use by Chrome when using the web client with these animated avatars. It drops when I go to a channel with no animation.

For the short term, trying to convince our users to not use GIFs, but in the long term it would be ideal to have the client not max out the CPU in this scenario.

@geekgonecrazy
Copy link
Member

We need to make gifs not play automatically. That would probably help a lot

@PRI-mcallen
Copy link
Author

That would solve it, it would be great to have that as something that can be set in preferences.

@JensvdHeydt
Copy link

Yes, for the short term, that would really solve this issue though I wonder why something like a gif actually spikes the CPU that much. Hardware acceleration anyone? :)

@BernhardRode
Copy link

BernhardRode commented Jul 22, 2016

Rocket chat is utilizing the CPU, even when the app is not active, minimized,....

is this a rocket chat specific issue or maybe electron?!?

Fun fact...

AFAICS ... it happens when the app is running in fullscreen. Not in Window mode!

@toddjames
Copy link

toddjames commented Jul 22, 2016

This also happens when an animated GIF is played in a room conversation on Windows.

While making GIFs not play automatically would help, that won't fix the problem. Users are going to play the GIF manually, and then they'll have a CPU usage problem for the duration of that GIF being on the screen.

@vladimirralev
Copy link

+1 report
Animated GIF in a room causes CPU to stick to 100% on a core on MacOS latest native.

@nano4711
Copy link

1+ on this ticket. I think it's not just an improvement. This issue makes the Rocket.Chat client useless on a laptop. MBP battery is empty in under 2h with a running Rocket.Chat client.

@toddjames
Copy link

I know I commented in July, but I'll just add in that this is still an issue for us. The lag spikes on users' computers due to this issue is currently preventing us from deploying Rocket.Chat company-wide.

@tyrel
Copy link

tyrel commented Oct 19, 2016

Yesterday in a meeting I heard a few OS X users complain about 100% CPU usage on Rocket.Chat's native client. Although not an OS X user myself, I would consider this a major bug, not an improvement. There is no reason any chat application should use 100% CPU, even if it's displaying an animated GIF.

@geekgonecrazy
Copy link
Member

geekgonecrazy commented Oct 19, 2016

Is this happening at all with people using it in chrome on OSX or just the desktop client? Maybe we should remove gif's from being able to be used on avatars until we get a good solution for this?

@PRI-mcallen
Copy link
Author

@geekgonecrazy that would be great. Or option to globally enable or disable animated avatars, and even animated images in general.

@PRI-mcallen
Copy link
Author

Agree that this is a bug, not an improvement. It has a serious effect on laptop performance and battery life.

@tyrel
Copy link

tyrel commented Oct 19, 2016

In our case, none of us have animated GIF avatars, and the performance issue is far worse on the native OS X client than in Chrome. We do have some custom emoticons which are animated GIFs and occasionally GIFs are posted to channels; in that case, it doesn't appear to auto-play in Chrome but it does in the native OS X client.

@geekgonecrazy
Copy link
Member

Related to: RocketChat/Rocket.Chat#4055

@tyrel are your custom emoji large in size or play length?

@tyrel
Copy link

tyrel commented Oct 19, 2016

I'm not sure what you mean exactly by "large". Play length is all less than a couple seconds. From what I can see the largest one by pixels is 128x128, but most are 50x50 or smaller. It's worth noting that we had all these emoji on Slack (and many more) with no problems at all. In addition, the slowness seems to happen even in channels where nobody has posted anything at all, although it definitely gets worse in channels with GIFs.

@footplus
Copy link

Up ? This is still happening on 2.1.0...

@tanc
Copy link

tanc commented Jan 11, 2017

I'm also seeing this issue with animated gifs (not as Avatars) on the OS X client. I haven't tested in browsers.

@apfelbox
Copy link

Still an issue on macOS, the CPU peaks to 100% with animated GIFs. I guess that removing GIF support is not a good solution, but what's the status on fixing this issue?

Please note, that opening the same room in Chrome doesn't have this issue.

@keichinger
Copy link

keichinger commented Apr 17, 2018

We're currently in the process of converting from Slack over to Rocket.Chat and while the import is still running I've downloaded the native app form the macOS App Store to test out a few things.

I was trying to get used to the new shortcuts (no more Cmd+T to quick-open, instead it's Cmd+K) I left open our previous #general channel where we've posted three gif links the other day. I've noticed an increased lag and less playback frames from the gifs followed by a lot of blue squiggles inside the scroll bar (the one you see when you're being mentioned or do a search in Google Chrome using Cmd+F, just in a different color). It was so bad that Rocket.Chat+ Helper was consuming 100% of my CPU to the moment the app was no longer responding at all and crashed.

image

Just having the app opened while writing this response and Rocket.Chat+'s usage is back again at 40%. Having a native app that consumes that much resources (even compared to Slack) is hard to justify, especially since people want to run other apps as well :)

image

I'm not entirely sure whether the following one is related but is it intended that gifs stop playing when you do a right click anywhere in the app?

2018-04-17_at_11 44

@alueers
Copy link

alueers commented May 7, 2019

+1 Any News on this?

@tassoevan tassoevan transferred this issue from RocketChat/Rocket.Chat Jul 25, 2019
@regetskcob
Copy link

+1

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

No branches or pull requests