diff options
author | Michael Schroeder <mls@suse.de> | 2009-09-01 18:18:40 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2009-09-01 18:18:40 +0200 |
commit | d72d5af43fef263e8cb9d5ae49c0547ae576b346 (patch) | |
tree | 3c96bffa50825992b9ce9765a94cca201fb5412d /ext | |
parent | 4a8450fc438b545b64cde1c2671c509158f015b8 (diff) | |
download | libsolv-d72d5af43fef263e8cb9d5ae49c0547ae576b346.tar.gz libsolv-d72d5af43fef263e8cb9d5ae49c0547ae576b346.tar.bz2 libsolv-d72d5af43fef263e8cb9d5ae49c0547ae576b346.zip |
- fix speed regression in repo_susetags
Diffstat (limited to 'ext')
-rw-r--r-- | 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 */ |