Skip to content
Snippets Groups Projects
Commit 75802cb0 authored by Timo Teräs's avatar Timo Teräs
Browse files

db: increase hash sizes a bit

parent 1339b143
No related branches found
No related tags found
No related merge requests found
......@@ -741,8 +741,8 @@ int apk_db_open(struct apk_database *db, const char *root, unsigned int flags)
memset(db, 0, sizeof(*db));
apk_hash_init(&db->available.names, &pkg_name_hash_ops, 1000);
apk_hash_init(&db->available.packages, &pkg_info_hash_ops, 4000);
apk_hash_init(&db->installed.dirs, &dir_hash_ops, 1000);
apk_hash_init(&db->installed.files, &file_hash_ops, 4000);
apk_hash_init(&db->installed.dirs, &dir_hash_ops, 2000);
apk_hash_init(&db->installed.files, &file_hash_ops, 10000);
list_init(&db->installed.packages);
db->cache_dir = apk_static_cache_dir;
......@@ -1298,12 +1298,10 @@ static int apk_db_install_archive_entry(void *_ctx,
ctx->script_pending = TRUE;
return apk_db_run_pending_script(ctx);
}
r = apk_db_run_pending_script(ctx);
if (r != 0)
return r;
/* Show progress */
if (ctx->cb) {
size_t size = ctx->installed_size;
......@@ -1323,7 +1321,9 @@ static int apk_db_install_archive_entry(void *_ctx,
/* Make sure the file is part of the cached directory tree */
if (diri == NULL ||
apk_blob_compare(APK_BLOB_PTR_LEN(diri->dir->name, diri->dir->namelen), bdir) != 0) {
apk_blob_compare(APK_BLOB_PTR_LEN(diri->dir->name,
diri->dir->namelen),
bdir) != 0) {
struct hlist_node *n;
hlist_for_each_entry(diri, n, &pkg->owned_dirs, pkg_dirs_list) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment