pop-os/cosmic-comp

high CPU use specific case

squalou opened this issue · 8 comments

Hi,

just to mention a use case that may, or may not not, be useful for future performance improvements.

Basically happening right now : writing this issue in firefox brings cosmic-comp use to 30% of a core on my hardware. More than frefox-bin itself.

Now a funny part :

  • open firefox in a worskpace, start a meeting, cocmic-comp up to 35%, someimes more.
  • hide the meeting tab (open another tab) : same thing
  • put another window in front : same thing

but

change active workspace : cpu use goes does down.

As if visible or not, provided a window is on the visible workspace, cosmic-comp works for it.

Maybe that's totally normal, maybe not.

Feel free to instantly close this as it's not really an issue, more a real life observation, and you all maybe already know this.

All in all when I compare to 22.04 with pop extension on gnome shell, the cpu use difference is huge.
The average for a similar use (8 cores average reported by top, so not very precise) : under COSMIC : around 5% idle, versus less than 1%.

Do you use firefox with or without client-side decorations?

If I refer to this old article : I'd say with CSD

(untick "Title Bar" in menu customization)
https://vitux.com/how-to-try-firefox-client-side-decoration-csd-on-ubuntu/

Maybe there's another way to make sure ?

(i'm giving a try without CSD to see what happens, doing it right now and it's far better but, can't judge in 30 seconds, will tell after some real work)

Guessing this is the same bug as stacks causing higher cpu load then. Basically whenever the compositor has to render text this happens.

Indeed after a few hours without CSD, I can confirm that it's correlated to it.

adding reference #703

I'm facing the same issue with Mullvad Browser (Firefox based). Oddly, this happens only when the window is still, dragging the window lowers the CPU load and dropping it immediately increases the CPU load.

for the records, on my current hardware, running pop 22.04,
after an uptime of 3 days, and usual work-use (meaning mostly : firefox, IDE; terminal),
as a reference using gnome :

ps -p $(pgrep "gnome-shell$") -o %cpu will tell : 2.9 %

which is an average over 3 days.

I'll try to switch to cosmic and compare with cosmic-comp, out of pure curiosity.

In case I'm wrong on the approach (comparing wrong processes for instance), please tell :)

14.7% after one regular day use.

half a core pretty much constantly. Didn't expect that.