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>
This commit is contained in:
parent
ea8a7a82da
commit
7548697a6b
|
@ -216,8 +216,6 @@ class PackageListModel(gtk.TreeStore):
|
|||
|
||||
self[item_path][self.COL_INC] = True
|
||||
|
||||
self.selection_change_notification()
|
||||
|
||||
it = self.get_iter(item_path)
|
||||
|
||||
# If user explicitly selects a recipe, all its providing packages are selected.
|
||||
|
@ -276,8 +274,6 @@ class PackageListModel(gtk.TreeStore):
|
|||
|
||||
self[item_path][self.COL_INC] = False
|
||||
|
||||
self.selection_change_notification()
|
||||
|
||||
item_name = self[item_path][self.COL_NAME]
|
||||
item_rdep = self[item_path][self.COL_RDEP]
|
||||
it = self.get_iter(item_path)
|
||||
|
@ -343,6 +339,7 @@ class PackageListModel(gtk.TreeStore):
|
|||
else:
|
||||
left.append(pn)
|
||||
|
||||
self.selection_change_notification()
|
||||
return left
|
||||
|
||||
def get_selected_packages(self):
|
||||
|
@ -604,7 +601,6 @@ class RecipeListModel(gtk.ListStore):
|
|||
item_deps = self[item_path][self.COL_DEPS]
|
||||
|
||||
self[item_path][self.COL_INC] = True
|
||||
self.selection_change_notification()
|
||||
|
||||
item_bin = self[item_path][self.COL_BINB].split(', ')
|
||||
if binb and not binb in item_bin:
|
||||
|
@ -642,8 +638,6 @@ class RecipeListModel(gtk.ListStore):
|
|||
|
||||
self[item_path][self.COL_INC] = False
|
||||
|
||||
self.selection_change_notification()
|
||||
|
||||
item_name = self[item_path][self.COL_NAME]
|
||||
item_deps = self[item_path][self.COL_DEPS]
|
||||
if item_deps:
|
||||
|
@ -703,6 +697,7 @@ class RecipeListModel(gtk.ListStore):
|
|||
path = self.pn_path[pn]
|
||||
self.include_item(item_path=path,
|
||||
binb="User Selected")
|
||||
self.selection_change_notification()
|
||||
|
||||
def get_selected_image(self):
|
||||
it = self.get_iter_first()
|
||||
|
@ -724,3 +719,4 @@ class RecipeListModel(gtk.ListStore):
|
|||
self.include_item(item_path=path,
|
||||
binb="User Selected",
|
||||
image_contents=True)
|
||||
self.selection_change_notification()
|
||||
|
|
|
@ -206,6 +206,7 @@ class PackageSelectionPage (HobPage):
|
|||
else:
|
||||
self.package_model.exclude_item(item_path=path)
|
||||
|
||||
self.refresh_selection()
|
||||
self.builder.window_sensitive(True)
|
||||
|
||||
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
|
||||
|
|
|
@ -202,6 +202,7 @@ class RecipeSelectionPage (HobPage):
|
|||
else:
|
||||
self.recipe_model.exclude_item(item_path=path)
|
||||
|
||||
self.refresh_selection()
|
||||
self.builder.window_sensitive(True)
|
||||
|
||||
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
|
||||
|
|
Loading…
Reference in New Issue