From: Joshua Lock <josh@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 11/11] Hob: improve recipe/package selection performance
Date: Wed, 14 Mar 2012 12:37:28 -0700 [thread overview]
Message-ID: <4F60F378.6070206@linux.intel.com> (raw)
In-Reply-To: <b2f277bf2d1de5aff3f9ef5be9cd3a9c81897852.1331716896.git.dongxiao.xu@intel.com>
On 14/03/12 02:26, Dongxiao Xu wrote:
> 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.
Awesome! So instead of sending the change notification for each
included/excluded item with this change the signal will be sent once
when a set of changes are made. Right?
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/hoblistmodel.py | 10 +++-------
> lib/bb/ui/crumbs/packageselectionpage.py | 1 +
> lib/bb/ui/crumbs/recipeselectionpage.py | 1 +
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> index edd61b5..caf31bc 100644
> --- a/lib/bb/ui/crumbs/hoblistmodel.py
> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> @@ -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()
> diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
> index 0427fe2..4fb199e 100755
> --- a/lib/bb/ui/crumbs/packageselectionpage.py
> +++ b/lib/bb/ui/crumbs/packageselectionpage.py
> @@ -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):
> diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
> index 234734c..50d4363 100755
> --- a/lib/bb/ui/crumbs/recipeselectionpage.py
> +++ b/lib/bb/ui/crumbs/recipeselectionpage.py
> @@ -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):
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-03-14 19:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
2012-03-14 9:26 ` [PATCH 01/11] Hob: add "Close" button to "BinbDialog" Dongxiao Xu
2012-03-14 19:38 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 02/11] Hob: Disable the handling of "NoProvider" event Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-15 8:31 ` Xu, Dongxiao
2012-03-15 22:35 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 03/11] cooker: add package rdepends and rrecommends info Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 04/11] Hob: Fix the image installation dependency Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-15 6:02 ` Xu, Dongxiao
2012-03-15 17:47 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 06/11] Hob: Remove the indication in machine/base image combobox Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 07/11] Hob: Remove the recipe/package populated signal Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 10/11] Hob: Add stop button for parsing progress Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-15 0:44 ` Xu, Dongxiao
2012-03-14 9:26 ` [PATCH 11/11] Hob: improve recipe/package selection performance Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock [this message]
2012-03-14 23:54 ` Xu, Dongxiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F60F378.6070206@linux.intel.com \
--to=josh@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox