[orca] Web: Only generate ancestors for the first item on a new line
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Only generate ancestors for the first item on a new line
- Date: Mon, 3 Feb 2020 20:58:08 +0000 (UTC)
commit 9c3001d39eb1a8c7dc56e95ef04d569396f075a4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Feb 3 15:57:02 2020 -0500
Web: Only generate ancestors for the first item on a new line
Usually the ancestors for subsequent objects on the line have not
changed, but the work of determining that can hurt performance.
src/orca/scripts/web/speech_generator.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index d8501568e..bf4369f90 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -45,6 +45,18 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
def __init__(self, script):
super().__init__(script)
+ def _generateOldAncestors(self, obj, **args):
+ if args.get('index', 0) > 0:
+ return []
+
+ return super()._generateOldAncestors(obj, **args)
+
+ def _generateNewAncestors(self, obj, **args):
+ if args.get('index', 0) > 0:
+ return []
+
+ return super()._generateNewAncestors(obj, **args)
+
def _generateAncestors(self, obj, **args):
if not self._script.utilities.inDocumentContent(obj):
return super()._generateAncestors(obj, **args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]