summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-03-14 10:53:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-15 10:35:17 +0000
commit7548697a6b5e2a0268f149c296b74a750ad917d6 (patch)
treeedf1acb7014a81ac0f5c7dd124dd32d92dab475e /bitbake/lib/bb/ui
parentea8a7a82da8fa1fa3ff89877fa31dad33407d734 (diff)
downloadpoky-7548697a6b5e2a0268f149c296b74a750ad917d6.tar.gz
Hob: improve recipe/package selection performance
Originally we will send selection chagned notification in each include_item and exclude_item, which is time cost since these are recursive functions and we may select hundreds of recipes/packages. The improvement is to move the notification from include_item and exclude_item to the place where the two functions are called. This could greatly improve the selection/deselection speed for recipe and package lists. (Bitbake rev: 5ad7c54f4b8739b9ae097c68978093a53f950ed7) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hoblistmodel.py10
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/packageselectionpage.py1
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/recipeselectionpage.py1
3 files changed, 5 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
index edd61b50c4..caf31bc325 100644
--- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
@@ -216,8 +216,6 @@ class PackageListModel(gtk.TreeStore):
216 216
217 self[item_path][self.COL_INC] = True 217 self[item_path][self.COL_INC] = True
218 218
219 self.selection_change_notification()
220
221 it = self.get_iter(item_path) 219 it = self.get_iter(item_path)
222 220
223 # If user explicitly selects a recipe, all its providing packages are selected. 221 # If user explicitly selects a recipe, all its providing packages are selected.
@@ -276,8 +274,6 @@ class PackageListModel(gtk.TreeStore):
276 274
277 self[item_path][self.COL_INC] = False 275 self[item_path][self.COL_INC] = False
278 276
279 self.selection_change_notification()
280
281 item_name = self[item_path][self.COL_NAME] 277 item_name = self[item_path][self.COL_NAME]
282 item_rdep = self[item_path][self.COL_RDEP] 278 item_rdep = self[item_path][self.COL_RDEP]
283 it = self.get_iter(item_path) 279 it = self.get_iter(item_path)
@@ -343,6 +339,7 @@ class PackageListModel(gtk.TreeStore):
343 else: 339 else:
344 left.append(pn) 340 left.append(pn)
345 341
342 self.selection_change_notification()
346 return left 343 return left
347 344
348 def get_selected_packages(self): 345 def get_selected_packages(self):
@@ -604,7 +601,6 @@ class RecipeListModel(gtk.ListStore):
604 item_deps = self[item_path][self.COL_DEPS] 601 item_deps = self[item_path][self.COL_DEPS]
605 602
606 self[item_path][self.COL_INC] = True 603 self[item_path][self.COL_INC] = True
607 self.selection_change_notification()
608 604
609 item_bin = self[item_path][self.COL_BINB].split(', ') 605 item_bin = self[item_path][self.COL_BINB].split(', ')
610 if binb and not binb in item_bin: 606 if binb and not binb in item_bin:
@@ -642,8 +638,6 @@ class RecipeListModel(gtk.ListStore):
642 638
643 self[item_path][self.COL_INC] = False 639 self[item_path][self.COL_INC] = False
644 640
645 self.selection_change_notification()
646
647 item_name = self[item_path][self.COL_NAME] 641 item_name = self[item_path][self.COL_NAME]
648 item_deps = self[item_path][self.COL_DEPS] 642 item_deps = self[item_path][self.COL_DEPS]
649 if item_deps: 643 if item_deps:
@@ -703,6 +697,7 @@ class RecipeListModel(gtk.ListStore):
703 path = self.pn_path[pn] 697 path = self.pn_path[pn]
704 self.include_item(item_path=path, 698 self.include_item(item_path=path,
705 binb="User Selected") 699 binb="User Selected")
700 self.selection_change_notification()
706 701
707 def get_selected_image(self): 702 def get_selected_image(self):
708 it = self.get_iter_first() 703 it = self.get_iter_first()
@@ -724,3 +719,4 @@ class RecipeListModel(gtk.ListStore):
724 self.include_item(item_path=path, 719 self.include_item(item_path=path,
725 binb="User Selected", 720 binb="User Selected",
726 image_contents=True) 721 image_contents=True)
722 self.selection_change_notification()
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
index 0427fe2f6d..4fb199e521 100755
--- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
@@ -206,6 +206,7 @@ class PackageSelectionPage (HobPage):
206 else: 206 else:
207 self.package_model.exclude_item(item_path=path) 207 self.package_model.exclude_item(item_path=path)
208 208
209 self.refresh_selection()
209 self.builder.window_sensitive(True) 210 self.builder.window_sensitive(True)
210 211
211 def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree): 212 def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
index 234734c552..50d43637cd 100755
--- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -202,6 +202,7 @@ class RecipeSelectionPage (HobPage):
202 else: 202 else:
203 self.recipe_model.exclude_item(item_path=path) 203 self.recipe_model.exclude_item(item_path=path)
204 204
205 self.refresh_selection()
205 self.builder.window_sensitive(True) 206 self.builder.window_sensitive(True)
206 207
207 def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree): 208 def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):