ref: refs/heads/master
commit 2e534cd867980d067e944b004d134c8dabc02291
Author: Michael Schroeder
Date: Tue Sep 1 18:18:40 2009 +0200
- fix speed regression in repo_susetags
---
ext/repo_susetags.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ext/repo_susetags.c b/ext/repo_susetags.c
index 242e7c4..e148d85 100644
--- a/ext/repo_susetags.c
+++ b/ext/repo_susetags.c
@@ -463,6 +463,7 @@ repo_add_susetags(Repo *repo, FILE *fp, Id defvendor, const char *language, int
Id handle = 0;
Hashtable joinhash = 0;
Hashmask joinhashm = 0;
+ int createdpkgs = 0;
if ((flags & (SUSETAGS_EXTEND|REPO_EXTEND_SOLVABLES)) != 0 && repo->nrepodata)
{
@@ -675,6 +676,7 @@ repo_add_susetags(Repo *repo, FILE *fp, Id defvendor, const char *language, int
s->evr = makeevr(pool, join2(sp[1], "-", sp[2]));
s->arch = str2id(pool, sp[3], 1);
s->vendor = defvendor;
+ createdpkgs = 1;
}
last_found_pack = (s - pool->solvables) - repo->start;
if (data)
@@ -777,11 +779,11 @@ repo_add_susetags(Repo *repo, FILE *fp, Id defvendor, const char *language, int
last_found_pack = 0;
handle = 0;
indesc++;
- if (indesc > 1)
+ if (createdpkgs)
{
sat_free(joinhash);
- repodata_internalize(data);
joinhash = joinhash_init(repo, &joinhashm);
+ createdpkgs = 0;
}
continue;
case CTAG('=', 'V', 'n', 'd'): /* vendor */
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org