[Yum-devel] [PATCH] Optimization for pkgExcluder, if we have no excluders do nothing.
James Antill
james at and.org
Wed Aug 19 05:41:36 UTC 2009
This seems like what it'd do anyway, the big differences are:
1. We don't .lower() the elements of pkgtup for each call.
2. We don't store everything we load in the whitelist.
...this nets me a 5-10% improvement ... roughly 2.56 seconds => 2.35
seconds, for check-update.
---
yum/sqlitesack.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 5b75cf5..7a2b700 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -585,6 +585,9 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
self._delPackageRK(repo, pkgKey)
return True
+ if not self._pkgExcluder:
+ return False
+
data = {'n' : n.lower(), 'pkgtup' : (n, a, e, v, r), 'marked' : False}
e = e.lower()
v = v.lower()
--
1.6.2.5
More information about the Yum-devel
mailing list