Public bug reported:

up_device_changed_cb iterates over all devices every time it's called.
It is passed the device so this is unnecessary work and will result in a
lot of dbus traffic. You should just look at the device which you've
been told has changed.

With https://code.launchpad.net/~pitti/powerd/upower0.99/+merge/240141
we're getting upower 0.99 support. One of the new additions to the 1.0
API you get with this version is proper notify signals for properties on
UpClient and UpDevice. powerd should be refactored to only listen to
property changes in the properties it is interested in. This will result
in more efficient code and a process that is only woken up when it needs
to be, and it will be nicer as it will then be properly event driven.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: powerd (not installed)
ProcVersionSignature: Ubuntu 3.16.0-23.31-generic 3.16.4
Uname: Linux 3.16.0-23-generic x86_64
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Oct 30 17:05:13 2014
InstallationDate: Installed on 2012-10-07 (752 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20121007)
SourcePackage: powerd
UpgradeStatus: Upgraded to utopic on 2013-05-07 (541 days ago)

** Affects: powerd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug utopic

** Summary changed:

- Improve device_changed callback
+ device_changed callback does unnecessary work

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1387810

Title:
  device_changed callback does unnecessary work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/powerd/+bug/1387810/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to