After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 545849 - Only poll for mouse movement if someone is listening for mouse:rel, mouse:abs events
Only poll for mouse movement if someone is listening for mouse:rel, mouse:abs...
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: performance
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2008-08-01 13:14 UTC by Willie Walker
Modified: 2008-08-12 07:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.38 KB, patch)
2008-08-04 08:27 UTC, Li Yuan
none Details | Review
update patch (6.17 KB, patch)
2008-08-04 09:15 UTC, Li Yuan
committed Details | Review

Description Willie Walker 2008-08-01 13:14:02 UTC
From https://bugzilla.redhat.com/show_bug.cgi?id=227476, we see that the at-spi-registryd has a polling loop to detect mouse movement events.  This costs quite a bit of extra power (and thus battery life).

If possible, we might be able to avoid this situation by only performing the poll if an assistive technology has registered for mouse:rel and/or mouse:abs events.  Since mouse motion events are also not preemptable, we might also suggest that assistive technologies themselves do the polling.
Comment 1 Li Yuan 2008-08-04 08:27:33 UTC
Created attachment 115806 [details] [review]
patch

The patch makes registryd doesn't poll when there isn't listeners for mouse:ref and mouse:abs events. Starts polling when someone registers listeners for mouse:ref and mouse:abs. After the last listener for mouse:ref and mouse:abs deregisters, registryd will stop polling again.
Comment 2 Li Yuan 2008-08-04 09:15:49 UTC
Created attachment 115807 [details] [review]
update patch

also enable polling when there is mouse device listener.
Comment 3 Li Yuan 2008-08-04 09:20:51 UTC
I'd like to commit the patch and release 1.23.6 to let users test it.
Comment 4 André Klapper 2008-08-04 14:57:32 UTC
I was a bit confused because the ticket is still open, but yeah, it's in:
http://svn.gnome.org/viewvc/at-spi?view=revision&revision=1034
Let's see if it works out before closing, correct. And thanks for the quick patch! :-)
Comment 5 Willie Walker 2008-08-04 19:05:29 UTC
I just tested this with the latest gnome-mag, latest orca, and latest at-spi from trunk and noticed no regressions.  Thanks for the quick fix, Li!