[orca] Improve performance of building flat review context
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Improve performance of building flat review context
- Date: Wed, 7 Nov 2012 21:42:41 +0000 (UTC)
commit 5f0bfce28887920644d859c2c3cc54bc19b97eb3
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Nov 7 16:41:16 2012 -0500
Improve performance of building flat review context
src/orca/flat_review.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/flat_review.py b/src/orca/flat_review.py
index 5eda1e7..65c87e4 100644
--- a/src/orca/flat_review.py
+++ b/src/orca/flat_review.py
@@ -874,7 +874,7 @@ class Context:
offset = 0
lastEndOffset = -1
upperMax = lowerMax = text.characterCount
- upperMid = lowerMid = upperMax /2
+ upperMid = lowerMid = int(upperMax / 2)
upperMin = lowerMin = 0
upperY = lowerY = 0
oldMid = 0
@@ -890,7 +890,7 @@ class Context:
upperMax = upperMid
else:
upperMin = upperMid
- upperMid = (upperMax - upperMin) /2 + upperMin
+ upperMid = int((upperMax - upperMin) / 2) + upperMin
# performing binary search to locate last line inside clipped area
oldMid = 0
@@ -905,7 +905,7 @@ class Context:
lowerMax = lowerMid
else:
lowerMin = lowerMid
- lowerMid = (lowerMax - lowerMin) /2 + lowerMin
+ lowerMid = int((lowerMax - lowerMin) / 2) + lowerMin
# finding out the zones
offset = upperMin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]