All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Depexp fixes
@ 2013-08-05 16:12 Ross Burton
  2013-08-05 16:12 ` [PATCH 1/3] depexp: make parse() a member function Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ross Burton @ 2013-08-05 16:12 UTC (permalink / raw)
  To: bitbake-devel

Hi,

I was doing some depexp runs against a world build and almost died of boredom.
So, after at least five years I'll try and finish depexp off...

Attached is a series to fix a runtime exception and DOUBLE the speed of loading
the data.  Whilst this sounds good the time to get the data from the bitbake
structures to the GTK+ widgetry is still ~30 seconds on my machine.  Still,
better than 60 seconds.

Ross

The following changes since commit 4cff3defb545643132b7233fcffb3fedc1bf182b:

  grep: Add patch for texinfo 5.1 (2013-08-03 10:33:14 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ross/depexp

for you to fetch changes up to 8b1a3c7eb0110cbb2345d32f26d37cb7fc5e8d6e:

  depexp: fix typo in variable name (2013-08-05 16:39:47 +0100)

----------------------------------------------------------------
Ross Burton (3):
      depexp: make parse() a member function
      depexp: insert data instead of append/set, for speed
      depexp: fix typo in variable name

 bitbake/lib/bb/ui/depexp.py |   28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

Ross Burton (3):
  depexp: make parse() a member function
  depexp: insert data instead of append/set, for speed
  depexp: fix typo in variable name

 bitbake/lib/bb/ui/depexp.py |   28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] depexp: make parse() a member function
  2013-08-05 16:12 [PATCH 0/3] Depexp fixes Ross Burton
@ 2013-08-05 16:12 ` Ross Burton
  2013-08-05 16:12 ` [PATCH 2/3] depexp: insert data instead of append/set, for speed Ross Burton
  2013-08-05 16:12 ` [PATCH 3/3] depexp: fix typo in variable name Ross Burton
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2013-08-05 16:12 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/lib/bb/ui/depexp.py |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py
index 885c31a..b7e6f8f 100644
--- a/bitbake/lib/bb/ui/depexp.py
+++ b/bitbake/lib/bb/ui/depexp.py
@@ -163,23 +163,23 @@ class DepExplorer(gtk.Window):
         self.revdep_treeview.set_current_package(current_package)
 
 
-def parse(depgraph, pkg_model, depends_model):
-    for package in depgraph["pn"]:
-        pkg_model.set(pkg_model.append(), COL_PKG_NAME, package)
+    def parse(self, depgraph):
+        for package in depgraph["pn"]:
+            self.pkg_model.set(self.pkg_model.append(), COL_PKG_NAME, package)
 
-    for package in depgraph["depends"]:
-        for depend in depgraph["depends"][package]:
-            depends_model.set (depends_model.append(),
-                              COL_DEP_TYPE, TYPE_DEP,
-                              COL_DEP_PARENT, package,
-                              COL_DEP_PACKAGE, depend)
+        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)
 
-    for package in depgraph["rdepends-pn"]:
-        for rdepend in depgraph["rdepends-pn"][package]:
-            depends_model.set (depends_model.append(),
-                              COL_DEP_TYPE, TYPE_RDEP,
-                              COL_DEP_PARENT, package,
-                              COL_DEP_PACKAGE, rdepend)
+        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)
 
 
 class gtkthread(threading.Thread):
@@ -293,7 +293,7 @@ def main(server, eventHandler, params):
 
             if isinstance(event, bb.event.DepTreeGenerated):
                 gtk.gdk.threads_enter()
-                parse(event._depgraph, dep.pkg_model, dep.depends_model)
+                dep.parse(event._depgraph)
                 gtk.gdk.threads_leave()
 
             if isinstance(event, bb.command.CommandCompleted):
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] depexp: insert data instead of append/set, for speed
  2013-08-05 16:12 [PATCH 0/3] Depexp fixes Ross Burton
  2013-08-05 16:12 ` [PATCH 1/3] depexp: make parse() a member function Ross Burton
@ 2013-08-05 16:12 ` Ross Burton
  2013-08-05 16:12 ` [PATCH 3/3] depexp: fix typo in variable name Ross Burton
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2013-08-05 16:12 UTC (permalink / raw)
  To: bitbake-devel

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

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):
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] depexp: fix typo in variable name
  2013-08-05 16:12 [PATCH 0/3] Depexp fixes Ross Burton
  2013-08-05 16:12 ` [PATCH 1/3] depexp: make parse() a member function Ross Burton
  2013-08-05 16:12 ` [PATCH 2/3] depexp: insert data instead of append/set, for speed Ross Burton
@ 2013-08-05 16:12 ` Ross Burton
  2 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2013-08-05 16:12 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/lib/bb/ui/depexp.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py
index 03ed823..cbda6d5 100644
--- a/bitbake/lib/bb/ui/depexp.py
+++ b/bitbake/lib/bb/ui/depexp.py
@@ -154,7 +154,7 @@ class DepExplorer(gtk.Window):
 
     def on_cursor_changed(self, selection):
         (model, it) = selection.get_selected()
-        if iter is None:
+        if it is None:
             current_package = None
         else:
             current_package = model.get_value(it, COL_PKG_NAME)
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-05 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-05 16:12 [PATCH 0/3] Depexp fixes Ross Burton
2013-08-05 16:12 ` [PATCH 1/3] depexp: make parse() a member function Ross Burton
2013-08-05 16:12 ` [PATCH 2/3] depexp: insert data instead of append/set, for speed Ross Burton
2013-08-05 16:12 ` [PATCH 3/3] depexp: fix typo in variable name Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.