Animating Icon eats up CPU and slows dows unity-panel-service

Bug #865601 reported by Owais Lone on 2011-10-03
78
This bug affects 13 people
Affects Status Importance Assigned to Milestone
sni-qt
Fix Released
Medium
Aurélien Gâteau
sni-qt (Ubuntu)
High
Aurélien Gâteau
Oneiric
High
Unassigned

Bug Description

[Impact]
Users running a Qt application with a systemtray icon which updates its icon frequently to produce an animation will get unity-panel-service to use all CPU.
This is because sni-qt continuously generate new images for the icon which unity-panel-service has to decode.

Skype is an example of application which triggers this bug.

[Development Fix]
Bug has been fixed upstream in sni-qt 0.2.6 by computing md4sums of the icon pixels, making it possible to reuse existing images instead of always generating new ones.

[Stable Fix]
debdiff attached to this report backports revision 88.1.4 of upstream, implementing the md4sum.

[Test Case]
1) Open Skype
2) Disconnect from internet. Skype icon starts to animate
3) Notice Skype unity-panel-service starts eating up the CPU and often making indicator menus unresponsive or lag like Ubuntu is running on a 200mhz cpu

[Regression Potential]
No regression expected. The fix has been tested from a PPA for a while now.

Aurélien Gâteau (agateau) wrote :

Thanks for your report.

I have an idea to fix this bug but it is non-trivial so I am not going to rush it for the Oneiric release. We will fix it with a SRU. I am probably going to provide the fix in the sni-qt PPA before though.

Changed in sni-qt:
assignee: nobody → Aurélien Gâteau (agateau)
status: New → Confirmed
importance: Undecided → Medium
Owais Lone (loneowais) wrote :

Great News.

Thanks for the awesome work

Aurélien Gâteau (agateau) wrote :

Can you try version 0.2.6~bzr89 from the sni-qt ppa? It should fix this problem.

Changed in sni-qt:
status: Confirmed → In Progress
Owais Lone (loneowais) wrote :

Perfect! Reduces unity-panel-service cpu usage from 80-95% down to 0-5%

Thanks!

Changed in sni-qt:
status: In Progress → Fix Released
Changed in sni-qt (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Aurélien Gâteau (agateau)
Aurélien Gâteau (agateau) wrote :

Here is a debdiff backporting the fix.

description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sni-qt (Ubuntu Oneiric):
status: New → Confirmed
Changed in sni-qt (Ubuntu Oneiric):
importance: Undecided → High
Changed in sni-qt (Ubuntu):
importance: Medium → High
status: Triaged → Fix Committed
Changed in sni-qt (Ubuntu Oneiric):
status: Confirmed → Fix Committed

Hello Owais, or anyone else affected,

Accepted sni-qt into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Owais Lone (loneowais) wrote :

I purged the ppa and downgraded to 0.2.5-0ubuntu3 from oneiric proposed.

I can confirm that the fix is working.

Martin Pitt (pitti) on 2011-10-27
tags: added: verification-done
removed: verification-needed
Troex Nevelin (troex) wrote :

I can confirm my CPU usage went down from 100% to 5% when skype icon rotating

And what CPU usage is it when it doesn't rotate? Using 5% CPU to to animate a 25x25 px area is still quite high.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sni-qt - 0.2.5-0ubuntu3

---------------
sni-qt (0.2.5-0ubuntu3) oneiric-proposed; urgency=low

  * Backport r88.1.4 from upstream trunk: avoid causing unity-panel-service to
    eat all CPU when an application uses an animated icon (LP: #865601)
 -- AurAlien GAteau <email address hidden> Tue, 25 Oct 2011 15:52:35 -0400

Changed in sni-qt (Ubuntu):
status: Fix Committed → Fix Released
Changed in sni-qt (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers