[orca] Remove old, unused, not-fully-implemented debugging code



commit 807420575a3581380c5ae4e3039c7a79c487222c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jun 6 20:45:45 2012 -0400

    Remove old, unused, not-fully-implemented debugging code

 src/orca/event_manager.py   |    2 --
 src/orca/orca.py            |    8 --------
 src/orca/scripts/default.py |   21 ---------------------
 src/orca/settings.py        |    6 ------
 4 files changed, 0 insertions(+), 37 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index ba8dd54..78bba72 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -490,8 +490,6 @@ class EventManager:
             try:
                 if event.source == self.registry.getDesktop(0):
                     _scriptManager.reclaimScripts()
-                    if settings.debugMemoryUsage:
-                        orca.cleanupGarbage()
                     if not event.source.childCount:
                         orca.shutdown()
                     return
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 9b72caf..b355ee9 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -93,14 +93,6 @@ def onEnabledChanged(gsetting, key):
 def getSettingsManager():
     return _settingsManager
 
-if settings.debugMemoryUsage:
-    gc.set_debug(gc.DEBUG_UNCOLLECTABLE
-                 | gc.DEBUG_COLLECTABLE
-                 | gc.DEBUG_INSTANCES
-                 | gc.DEBUG_OBJECTS
-                 | gc.DEBUG_SAVEALL)
-
-
 EXIT_CODE_HANG = 50
 
 # The user-settings module (see loadUserSettings).
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index f031d21..6249ada 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -940,15 +940,6 @@ class Script(script.Script):
                 #
                 _("Prints debug information about the application with focus."))
 
-        self.inputEventHandlers["printMemoryUsageHandler"] = \
-            input_event.InputEventHandler(
-                Script.printMemoryUsageHandler,
-                # Translators: this is a debug message that Orca users
-                # will not normally see. It describes a debug routine
-                # that will print Orca memory usage information.
-                #
-                _("Prints memory usage information."))
-
         self.inputEventHandlers["bookmarkCurrentWhereAmI"] = \
             input_event.InputEventHandler(
                 Script.bookmarkCurrentWhereAmI,
@@ -1166,14 +1157,6 @@ class Script(script.Script):
         import orca.common_keyboardmap as common_keyboardmap
         keyBindings.load(common_keyboardmap.keymap, self.inputEventHandlers)
 
-        if _settingsManager.getSetting('debugMemoryUsage'):
-            keyBindings.add(
-                keybindings.KeyBinding(
-                    "",
-                    settings.defaultModifierMask,
-                    settings.NO_MODIFIER_MASK,
-                    self.inputEventHandlers["printMemoryUsageHandler"]))
-
         try:
             keyBindings = settings.overrideKeyBindings(self, keyBindings)
         except:
@@ -3018,10 +3001,6 @@ class Script(script.Script):
 
         self.doWhereAmI(inputEvent, False)
 
-    def printMemoryUsageHandler(self, inputEvent):
-        """Prints memory usage information."""
-        print('TODO: print something useful for memory debugging')
-
     def printAppsHandler(self, inputEvent=None):
         """Prints a list of all applications to stdout."""
 
diff --git a/src/orca/settings.py b/src/orca/settings.py
index dca6b26..48a866a 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -636,12 +636,6 @@ synchronousToolkits     = ['VCL']
 #
 debugEventQueue         = False
 
-# If True, we collect information regarding memory usage and provide
-# keystrokes to dump the usage information to the console:
-# Orca+Ctrl+F8 for brief, Orca+Shift+Ctrl+F8 for detailed.
-#
-debugMemoryUsage        = False
-
 # The timeout value (in seconds) and callback used to determine if
 # Orca has hung or not.  The only setting one should muck with here is
 # the timeoutTime unless you want to create a custom callback handler



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