From 8e2000a3e28c96701e628d96c4a845bfe8f4eadb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Stadler?= Date: Sun, 23 Sep 2012 16:43:25 +0200 Subject: [PATCH] models: store line offsets in arrays --- debug-viewer/GstDebugViewer/GUI/models.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debug-viewer/GstDebugViewer/GUI/models.py b/debug-viewer/GstDebugViewer/GUI/models.py index 8013195..3d8a0bb 100644 --- a/debug-viewer/GstDebugViewer/GUI/models.py +++ b/debug-viewer/GstDebugViewer/GUI/models.py @@ -19,6 +19,7 @@ """GStreamer Debug Viewer GUI module.""" +from array import array from bisect import bisect_left import logging @@ -48,7 +49,7 @@ class LogModelBase (gtk.GenericTreeModel): ##self.props.leak_references = False - self.line_offsets = [] + self.line_offsets = array ("I") self.line_levels = [] # FIXME: Not so nice! self.line_cache = {} @@ -266,11 +267,9 @@ class FilteredLogModel (FilteredLogModelBase): YIELD_LIMIT = 10000 self.logger.debug ("preparing new filter") - ## del self.line_offsets[:] - ## del self.line_levels[:] - new_line_offsets = [] + new_line_offsets = array ("I") new_line_levels = [] - new_super_index = [] + new_super_index = array ("I") level_id = self.COL_LEVEL func = filter.filter_func def enum (): -- 2.7.4