Patchwork [bitbake-devel,2/3] depexp: insert data instead of append/set, for speed

login
register
mail settings
Submitter Ross Burton
Date Aug. 5, 2013, 4:12 p.m.
Message ID <87a392c25c6fed471c96b1bd781bfc481f1f03c4.1375718812.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/55151/
State New
Headers show

Comments

Ross Burton - Aug. 5, 2013, 4:12 p.m.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/lib/bb/ui/depexp.py |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py
index b7e6f8f..03ed823 100644
--- a/bitbake/lib/bb/ui/depexp.py
+++ b/bitbake/lib/bb/ui/depexp.py
@@ -165,21 +165,15 @@  class DepExplorer(gtk.Window):
 
     def parse(self, depgraph):
         for package in depgraph["pn"]:
-            self.pkg_model.set(self.pkg_model.append(), COL_PKG_NAME, package)
+            self.pkg_model.insert(0, (package,))
 
         for package in depgraph["depends"]:
             for depend in depgraph["depends"][package]:
-                self.depends_model.set (self.depends_model.append(),
-                                        COL_DEP_TYPE, TYPE_DEP,
-                                        COL_DEP_PARENT, package,
-                                        COL_DEP_PACKAGE, depend)
+                self.depends_model.insert (0, (TYPE_DEP, package, depend))
 
         for package in depgraph["rdepends-pn"]:
             for rdepend in depgraph["rdepends-pn"][package]:
-                self.depends_model.set (self.depends_model.append(),
-                                        COL_DEP_TYPE, TYPE_RDEP,
-                                        COL_DEP_PARENT, package,
-                                        COL_DEP_PACKAGE, rdepend)
+                self.depends_model.insert (0, (TYPE_RDEP, package, rdepend))
 
 
 class gtkthread(threading.Thread):