Summary: | Amarok unnecessarily eats CPU time when Analyzer applet is enabled. | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | James Eder <jimportal> |
Component: | Context View/Spectrum Analyzer | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | amichai2, dima, kde-bugs, TheCrasher |
Priority: | NOR | ||
Version: | 2.8.0 | ||
Target Milestone: | 2.9 | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
James Eder
2013-08-26 06:00:35 UTC
Of course the analyzer will require CPU time when it is being calculated and rendered. I don't understand your point here. Care to explain? It consumes CPU time while minimized with no song playing. I don't understand the need to render and calculate when no part of the window is being displayed and there's no audio to analyze. It shouldn't be calculating and rendering in that state. It should be idle and not eating battery needlessly. Oh, I see what you mean. Anyway, you are wrong, the Analyzer is actually not active at all when Amarok is not visible. And I'm quite proud of it too, because it took quite some extra care to make it like this. Its timer is completely disabled unless it's needed. Random small fluctuations in CPU usage can be due to other parts of Amarok that are working in the background. It's fairly consistent and it goes away entirely when I disable the Analyzer applet. I'm not making this up. You can check with powertop. With Amarok in tray mode without the analyzer sits at about .20 events/s. With the analyzer enabled it jumps up to around 24.2 events/s while minimized or hidden by tray mode. There is a known leak in the gstreamer library the phonon backend uses, but that is upstream and we have no influence over that. A leak causing CPU usage? Wat? (In reply to comment #5) > There is a known leak in the gstreamer library the phonon backend uses, but > that is upstream and we have no influence over that. A link would be useful. I'm running into this bug, too: I'm seeing 2-3% CPU usage, and it goes away if I remove the applet. Also confirmed by looking at "strace" output. Closing correctly. The analyzer applet has had some code adaptations since this report was opened, please file a new bug if you can reproduce this with the upcoming Amarok 2.9 or current git FWIW, this still happens with Amarok 2.8.0 on Kubuntu 14.10 (KDE 4.14.2). I came across this bug report when trying to figure out why Amarok is constantly taking up ~4.7% CPU when minimized and idle (nothing playing). After removing the analyzer it went down to 0.0%. I am experiencing the same problem on Kubuntu 15.04 using Amarok in version 2:2.8.0-0ubuntu4. After right click on the plugin in Amarok and choosing to remove the applet, the cpu usage stopped. I straced amarok and got repeatedly the following output (maybe that helps to identify the problem): -------------------- 8< -------------------- ... poll([{fd=7, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=7, revents=POLLOUT}]) writev(7, [{"\231\10\10\0\n\1@\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32}], 1) = 32 recvmsg(7, 0x7ffc337ccc90, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=7, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=7, revents=POLLIN|POLLOUT}]) recvmsg(7, {msg_name(0)=NULL, msg_iov(1)=[{"f\0\265\357\1\0\0\0\n\1@\3\t\0\0\0\232\211~\364\0\0\0\0f\272&\0a^\34\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 96 writev(7, [{"+\7\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4 poll([{fd=7, events=POLLIN}], 1, 4294967295) = 1 ([{fd=7, revents=POLLIN}]) recvmsg(7, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\266\357\0\0\0\0J\0@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 recvmsg(7, 0x7ffc337ccc90, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 15) = 1 ([{fd=3, revents=POLLIN}]) read(3, "\1\0\0\0\0\0\0\0", 16) = 8 recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 15) = 0 (Timeout) read(3, 0x7ffc337cdaf0, 16) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 0) = 0 (Timeout) recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 0) = 0 (Timeout) recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 0) = 0 (Timeout) recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 0) = 0 (Timeout) recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) write(3, "\1\0\0\0\0\0\0\0", 8) = 8 recvmsg(7, 0x7ffc337cd960, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=12, events=POLLIN}, {fd=45, events=POLLIN}, {fd=46, events=POLLIN}, {fd=48, events=POLLPRI}, {fd=49, events=POLLIN}, {fd=72, events=POLLIN}], 10, 0) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(7, 0x7ffc337cd980, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=7, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=7, revents=POLLOUT}]) writev(7, [{"\231\7\5\0\n\1@\3\1\0\0\0\1\0\0\0 \0\0\0", 20}, {NULL, 0}, {"", 0}], 3) = 20 poll([{fd=7, events=POLLIN}], 1, 4294967295) = 1 ([{fd=7, revents=POLLIN}]) recvmsg(7, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0\267\357\5\0\0\0\20\4\0\0r\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 52 recvmsg(7, 0x7ffc337ccb10, 0) = -1 EAGAIN (Resource temporarily unavailable) recvmsg(7, 0x7ffc337ccb10, 0) = -1 EAGAIN (Resource temporarily unavailable) ioctl(70, 0x400c645f, 0x7ffc337cce20) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccd80) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccd80) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccdb0) = 0 ioctl(70, 0xc0086457, 0x7ffc337ccbf0) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccbe0) = 0 ioctl(70, 0x4020645d, 0x7ffc337ccc70) = 0 ioctl(70, 0xc0086457, 0x7ffc337cc880) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337cc870) = 0 ioctl(70, 0x400c645f, 0x7ffc337cc880) = 0 ioctl(70, 0x40046460, 0x7ffc337ccb80) = 0 ioctl(70, 0x40046460, 0x7ffc337ccb90) = 0 ioctl(70, 0x40406469, 0x7ffc337ccb20) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccae0) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccae0) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccb10) = 0 ioctl(70, 0xc0086457, 0x7ffc337ccb00) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccaf0) = 0 ioctl(70, 0x400c645f, 0x7ffc337ccb00) = 0 ioctl(70, 0xc0086457, 0x7ffc337cc8a0) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337cc890) = 0 ioctl(70, 0x400c645f, 0x7ffc337cc8a0) = 0 ioctl(70, 0x40046460, 0x7ffc337ccb80) = 0 ioctl(70, 0x40046460, 0x7ffc337ccb90) = 0 ioctl(70, 0x40406469, 0x7ffc337ccb20) = 0 ioctl(70, 0xc0086457, 0x7ffc337ccb00) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337ccaf0) = 0 ioctl(70, 0x400c645f, 0x7ffc337ccb00) = 0 ioctl(70, 0xc0086457, 0x7ffc337cc8a0) = 0 ioctl(70, VIDIOC_INT_RESET, 0x7ffc337cc890) = 0 ioctl(70, 0x400c645f, 0x7ffc337cc8a0) = 0 ioctl(70, 0x40046460, 0x7ffc337ccb80) = 0 ioctl(70, 0x40046460, 0x7ffc337ccb90) = 0 ioctl(70, 0x40406469, 0x7ffc337ccb20) = 0 ... -------------------- 8< -------------------- |