bluebubbles-app icon indicating copy to clipboard operation
bluebubbles-app copied to clipboard

High idle CPU usage with web app (conversations view)

Open curiousercreative opened this issue 2 years ago • 10 comments

Hello, new to BlueBubbles but very excited for the potential here. I haven't used the web app much, but off the bat I'm noticing very high CPU usage with the app idle, but focused (2 threads, 50% and 25% of an i5-1135G7). I've got the app "installed" to the desktop, so it's in its own window and the only Chromium window open, but I've reproduced the same behavior with the app as a tab. With the app in a standard tab and when it's not focused/foreground the CPU usage is not high, so that's a workaround. I've tried "low memory mode" so far without success. I've also tested in Firefox and CPU usage is perhaps a touch higher.

Host details

  • Pop!_OS 21.04 (Linux 5.15)
  • Chromium Version 96.0.4664.110 (Official Build) (64-bit)

Web app status

  • Connection Status: CONNECTED
  • Private API Status: ENABLED
  • Private API Helper Bundle Status: DISCONNECTED
  • Latency: 56 ms
  • Server Version: 0.4.0
  • macOS Version: 11.6.0

curiousercreative avatar Dec 22 '21 21:12 curiousercreative

This may be a Flutter bug or a Chromium bug where the tab isn't suspended when it isn't functioning as a "normal" tab. We can try and look into it - the webapp is definitely on the heavy side just because it has a very similar feature set and functionality compared to the dedicated Android and Desktop apps (which I highly recommend checking out the latter on your main Linux machine - join our Discord to get a build).

tneotia avatar Dec 22 '21 21:12 tneotia

Same here with latest Edge browser. CPU usage is constanstly 4%.

dyipon avatar Jan 26 '22 22:01 dyipon

I just ried latest desktop alpha for windows, but eats 10% cpu :/

dyipon avatar Jan 26 '22 22:01 dyipon

I just ried latest desktop alpha for windows, but eats 10% cpu :/

Are you viewing a lot of images in a chat? Try going in the settings page or something and seeing if the usage is still 10%.

Mine hovers between 5-10% in a chat, but in settings its 0-1%. On the chat list page without any chat open, also 0-1%.

Edit: These are all foreground numbers btw, in background it should drop to 0% basically

tneotia avatar Jan 26 '22 22:01 tneotia

No, only just a few images per chats.

dyipon avatar Jan 27 '22 09:01 dyipon

Yeah, it only seems to affect conversation view. If you haven't selected a convo, CPU usage is pretty tame.

curiousercreative avatar Jan 27 '22 14:01 curiousercreative

Yeah, it only seems to affect conversation view. If you haven't selected a convo, CPU usage is pretty tame.

(Linux desktop app, using PopOs as well as Solus) Wow, Hadn't thought to unselect the message thread, but doing that drops the CPU usage down to almost nothing. Thanks for the tip!

It would be nice if minimizing the app did this automatically though. I usually keep it minimized in the tray and have always been surprised to see it constantly using ~30% of a single core, doing "nothing"

jimbolimbo13 avatar Apr 22 '22 15:04 jimbolimbo13

This is really wild. When I select a conversation in Chrome, CPU usage in the Chrome Task Manager for the tab shoots up to over 30%, sometimes over 60%. And yes, that happens while in focus, but that still seems wildly unacceptable to me. If I'm watching a YouTube video fullscreened on one monitor, and open the BlueBubbles web app on another monitor, YouTube playback slows to a crawl and eventually stops altogether. I've never seen any other page do this before. What's spinning on this page so hard?

dodgepong avatar May 12 '22 22:05 dodgepong

What's spinning on this page so hard?

Its really hard to pinpoint this to be honest. We don't run background tasks or anything like that, I honestly think its just the complexity of the UI that causes the high CPU usage (graphics usage). Flutter Web doesn't use HTML elements in the same way React does, it draws stuff to canvas directly. Images and video especially are really unoptimized, but they've said they fixed this in the latest Flutter 3.0 update, so hopefully that improves the performance some.

Nevertheless we will keep trying to improve the performance as time goes on... if you are using this on your main machine I would highly recommend using our dedicated desktop app instead. Performs a lot better and is overall better UX.

tneotia avatar May 12 '22 22:05 tneotia

Yeah, I think I've encountered a similar issue with another Flutter app. Note this behavior is consistent in the web app and Linux desktop app, or at least it was.

curiousercreative avatar May 14 '22 21:05 curiousercreative

The issues with CPU usage have been found and fixed for the next update on the webapp.

tneotia avatar Jan 01 '23 14:01 tneotia