xpra icon
Bug tracker and wiki

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#353 closed enhancement (fixed)

high CPU usage on spinner

Reported by: onlyjob Owned by: Antoine Martin
Priority: minor Milestone: 0.15
Component: client Version: 0.9.x
Keywords: Cc:

Description

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

Change History (12)

comment:1 Changed 7 years ago by Antoine Martin

Milestone: future
Type: defectenhancement

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.

comment:2 Changed 7 years ago by 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.

comment:3 Changed 7 years ago by Timo Juhani Lindfors

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

comment:4 Changed 6 years ago by Antoine Martin

Resolution: wontfix
Status: newclosed

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

comment:5 in reply to:  4 Changed 5 years ago by 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.

comment:6 Changed 5 years ago by 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..)

comment:7 in reply to:  6 Changed 5 years ago by 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. :-)

comment:8 Changed 5 years ago by Antoine Martin

Backported to v0.13.x in r7229.

comment:9 Changed 5 years ago by 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)

comment:10 Changed 5 years ago by Antoine Martin

Resolution: wontfix
Status: closedreopened

(setting milestone - reopening to change resolution tag)

comment:11 Changed 5 years ago by Antoine Martin

Resolution: fixed
Status: reopenedclosed

comment:12 Changed 5 years ago by Antoine Martin

Milestone: future0.15

(update milestone)

Note: See TracTickets for help on using tickets.