The app uses the Qt API QStorageInfo::bytesAvailable() method [1] every 1 
second.
For lack of a better API, one that would not require polling, we decided to go 
ahead with this one.
As Simon said, the polling only happens when the app is being actively used 
which means that even though it is indeed wasteful the amount of CPU used is 
not much in comparison to what the viewfinder uses in CPU and GPU when the 
camera app is up.

[1] https://doc-snapshots.qt.io/qt5-5.4/qstorageinfo.html

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to camera-app in Ubuntu.
https://bugs.launchpad.net/bugs/1471906

Title:
  camera app is polling the file system every second

Status in camera-app:
  Confirmed
Status in Canonical System Image:
  Confirmed
Status in camera-app package in Ubuntu:
  Confirmed

Bug description:
  from OEM bug #1471310

  running fnotifystat, I can see that every second the camera-app is
  polling away as follows:

  Total Open Close Read Write PID Process Pathname
    8.0 1.0 1.0 6.0 0.0 3175 camera-app /proc/3175/mounts
    2.0 1.0 1.0 0.0 0.0 3175 camera-app /dev/disk/by-label

  Total Open Close Read Write PID Process Pathname
    8.0 1.0 1.0 6.0 0.0 3175 camera-app /proc/3175/mounts
    2.0 1.0 1.0 0.0 0.0 3175 camera-app /dev/disk/by-label

  Total Open Close Read Write PID Process Pathname
    8.0 1.0 1.0 6.0 0.0 3175 camera-app /proc/3175/mounts
    2.0 1.0 1.0 0.0 0.0 3175 camera-app /dev/disk/by-label

  so it is consistently polling away. That's kinda wasteful on resources
  (e.g. battery drain).

To manage notifications about this bug go to:
https://bugs.launchpad.net/camera-app/+bug/1471906/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to