You have been subscribed to a public bug:

notify-osd does busy polling when displaying a notification.   Function
bubble_show() is busy polling redraw_handler and pointer_update at 60Hz.

The code should wait for motion notify events only in the area
surrounding the notification area and only then handle updates rather
than spinning on a 60hz poll.

        // FIXME: do nasty busy-polling rendering in the drawing-area
        priv->draw_handler_id = g_timeout_add (1000/FPS,
                                               (GSourceFunc) redraw_handler,
                                               self);

        // FIXME: read out current mouse-pointer position every 1/25 second
        priv->pointer_update_id = g_timeout_add (1000/FPS,
                                                 (GSourceFunc) pointer_update,
                                                 self);

The above code is running two sets of 60Hz polls and could be at least
combined since they run at the same rate to be wasteful in polled mode.
However, it should be fixed correctly not to poll in the first place.

To observe this fault, strace notify-osd and observe the insane amount
of poll() calls.

** Affects: notify-osd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
notify-osd busy polling consumes CPU and drains battery
https://bugs.launchpad.net/bugs/645130
You received this bug notification because you are a member of Ubuntu Bugs, 
which is subscribed to Ubuntu.

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

Reply via email to