[orca] Add setting to disable the pyatspi GIL idle handler



commit be84578fd8495e659fa4705c6544526b48d06f1f
Author: Willie Walker <william walker sun com>
Date:   Fri May 1 17:03:09 2009 -0400

    Add setting to disable the pyatspi GIL idle handler
    
    This change is made in response to
    http://bugzilla.gnome.org/show_bug.cgi?id=576954 where is appears
    as though the GIL idle handler in pyatspi is causing consumers of
    pyatspi (e.g., Orca and accerciser) to start consuming 100% of a
    CPU when the machine is idle.  We're pretty sure the GIL handler
    is not necessary, so this change gets rid of it for the 2.27.1
    development build of Orca.  If we see that users notice strange
    lock ups, however, we may need to change things back.
---
 src/orca/orca.py     |    3 +--
 src/orca/settings.py |    5 +++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/orca/orca.py b/src/orca/orca.py
index aa2ebc9..5663ca1 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -56,7 +56,6 @@ except RuntimeError:
     pass
 
 import getopt
-import gnome
 import os
 import signal
 import time
@@ -1223,7 +1222,7 @@ def start(registry):
     if settings.cacheValues:
         pyatspi.setCacheLevel(pyatspi.CACHE_PROPERTIES)
 
-    registry.start()
+    registry.start(gil=settings.useGILIdleHandler)
 
 def die(exitCode=1):
 
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 2dcf278..6ab25df 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -803,6 +803,11 @@ commFailureAttemptLimit = 5
 #
 gilSleepTime            = 0.00001
 
+# The value of the 'gil' parameter in the call to pyatspi.Registry.start
+# See http://bugzilla.gnome.org/show_bug.cgi?id=576954.
+#
+useGILIdleHandler       = False
+
 # If True, use the gidle __blockPreventor() code in atspi.py.
 #
 useBlockPreventor       = False



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]