diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-02 21:42:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-02 21:42:32 +0000 |
commit | f3a07ea9bd683ed27896480aeee169b619ad9f68 (patch) | |
tree | c0ef9f3e428a53298cd15eda409af5073a13f452 | |
parent | d88f75b5781694cd7821954a72dbba90bf8799df (diff) | |
download | portage-f3a07ea9bd683ed27896480aeee169b619ad9f68.tar.gz portage-f3a07ea9bd683ed27896480aeee169b619ad9f68.tar.bz2 portage-f3a07ea9bd683ed27896480aeee169b619ad9f68.zip |
Make profile stacking of default USE and package.* slightly more efficient
by skipping list.insert() calls when possible.
svn path=/main/trunk/; revision=9415
-rw-r--r-- | pym/portage/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2d30d0102..d5daf9648 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1878,7 +1878,8 @@ class config(object): else: break del keys - defaults.insert(pos, self.make_defaults_use[i]) + if self.make_defaults_use[i]: + defaults.insert(pos, self.make_defaults_use[i]) pos = len(defaults) defaults = " ".join(defaults) if defaults != self.configdict["defaults"].get("USE",""): @@ -1898,7 +1899,8 @@ class config(object): else: break del keys - useforce.insert(pos, self.useforce_list[i]) + if self.useforce_list[i]: + useforce.insert(pos, self.useforce_list[i]) pos = len(useforce) useforce = set(stack_lists(useforce, incremental=True)) if useforce != self.useforce: @@ -1918,7 +1920,8 @@ class config(object): else: break del keys - usemask.insert(pos, self.usemask_list[i]) + if self.usemask_list[i]: + usemask.insert(pos, self.usemask_list[i]) pos = len(usemask) usemask = set(stack_lists(usemask, incremental=True)) if usemask != self.usemask: |