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 692622 - Use g_timeout_add_seconds instead of g_timeout_add
Use g_timeout_add_seconds instead of g_timeout_add
Status: RESOLVED NOTABUG
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-27 08:10 UTC by B.Prathibha
Modified: 2015-12-21 21:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reduce no. of wakeups to save power (1.22 KB, patch)
2013-01-27 08:10 UTC, B.Prathibha
none Details | Review

Comment 1 B.Prathibha 2013-01-27 08:10:53 UTC
Created attachment 234515 [details] [review]
Reduce no. of wakeups to save power

Use g_timeout_add_seconds instead of g_timeout_add where possible.
Comment 2 Joanmarie Diggs (IRC: joanie) 2013-01-27 18:26:36 UTC
Thanks for the patch. But looking at the comments on the page you cite, I see the following:

   In particular the candidates for being replaced are
   timeouts called in a recurrent manner (eg polling) and
   that do not need an accurate timeout. Timeouts that are
   fired just once or that result in something visible to
   the user should usually not be changed.

Orca's timeout is not called in a recurrent manner. It is fired just once. It does result in something "visible" to the user (namely the presentation of a message). And the timeout should be accurate. So I think in Orca's case this change is not wanted.

As for power saving, the only time that timeout will get called is if:
1. The user is binding or rebinding an Orca command, and
2. The user selected a keybinding that is already bound to another command.