Xpra: Ticket #353: high CPU usage on spinner

Forwarding as reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711181

"spinners consume a lot of CPU time unnecessarily".

My laptop is usually connected to at least two xpra servers. If the network connection is bad I frequently see xpra drawing spinners over all windows. This is a good indicator but I think it uses bit too much CPU time causing my laptop fan to accelerate when the 3G connection drops:

Tasks: 154 total,   3 running, 150 sleeping,   0 stopped,   1 zombie
Cpu(s): 34.1%us,  0.7%sy,  0.0%ni, 65.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   5867296k total,  2151144k used,  3716152k free,   270956k buffers
Swap: 11460604k total,    50704k used, 11409900k free,  1002416k cached
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1548 root      20   0  220m 114m  11m R   62  2.0 190:29.15 Xorg
 9286 lindi     20   0  795m  79m  16m S    4  1.4   7:49.61 xpra
 9265 lindi     20   0  938m  72m  17m S    3  1.3  15:25.61 xpra


Thu, 06 Jun 2013 06:38:22 GMT - Antoine Martin: type changed; milestone set

First, I really do not understand why those bugs get reported to Debian first since those aren't specific to Debian at all. I don't see how that benefits anyone: I doubt Debian would fix the bugs downstream, and all I see is duplicated effort in bug handling. But whatever.


Now onto the bug itself: it doesn't look like a bug to me. Drawing on the screen uses CPU... not much we can do about that. If the connection comes back, the spinners disappear, if it stays down too long the client will eventually give up and disconnect, in the meantime we give an indication to the user (unless the window is minimized). Fixing the "bad network connection" is what I would prioritize.


Thu, 06 Jun 2013 07:44:39 GMT - onlyjob:

Thanks for your comment, so eloquently expressed. I fully agree that nobody benefits from reporting such bugs through Debian bug tracker. Indeed it takes more time to process. I forwarded your comment to reporter.


Mon, 10 Jun 2013 08:46:23 GMT - Timo Juhani Lindfors:

Yes it's not a bug as such, it was tagged as "Severity: wishlist" from the start.


Mon, 19 May 2014 11:58:27 GMT - Antoine Martin: status changed; resolution set

I have been told that people like the spinners... and faster gpus are getting cheaper everyday, so closing as wontfix.


Sat, 09 Aug 2014 23:39:20 GMT - onlyjob:

Replying to totaam:

I have been told that people like the spinners...

I'm one of those who do not like spinners as they are implemented in Xpra but not because of CPU usage: spinners hide last known window content which often interrupt me while I read text. Sometimes this interruption last only for some seconds and it quickly becomes annoying when happens too often on laggy/slow link.

I'd prefer spinners to appear over greyed or darkened windows to avoid hiding (last known) contents. Thanks.


Sun, 10 Aug 2014 01:28:10 GMT - Antoine Martin:

spinners hide last known window content which often interrupt me while I read text


As of r7224, this should no longer be the case: you should still be able to see the contents behind the spinners. Only downside is that it may flicker a bit. (which btw, has little to do with CPU usage..)


Mon, 11 Aug 2014 00:07:20 GMT - onlyjob:

Replying to totaam:

As of r7224, this should no longer be the case: you should still be able to see the contents behind the spinners.

Awesome, thanks very much, r7224 works as expected. Much better. :-)


Mon, 11 Aug 2014 03:06:13 GMT - Antoine Martin:

Backported to v0.13.x in r7229.


Sat, 27 Dec 2014 09:01:12 GMT - Antoine Martin:

FYI: r8302 paints the spinners using opengl, so this will now use a lot less CPU, and will prevent the flickering I have been seeing.

The downside is that we don't do alpha blending of the overlay, so we can't gray out the window contents. (maybe we can do this in #679)


Tue, 14 Apr 2015 17:09:57 GMT - Antoine Martin: status changed; resolution deleted

(setting milestone - reopening to change resolution tag)


Tue, 14 Apr 2015 17:10:03 GMT - Antoine Martin: status changed; resolution set


Fri, 01 May 2015 04:50:46 GMT - Antoine Martin: milestone changed

(update milestone)


Sat, 23 Jan 2021 04:52:31 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/353