summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-14 11:55:08 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-14 11:55:08 +0300
commitab37bd0b0c0da340222f8420ec2ee6ccdd13ce24 (patch)
tree8afbdc279ebeca5fc735b89024aa3c7b5f92b4ed /src/apk_database.h
parente00f5ea74a448c1148725794d89a4149b98fdb11 (diff)
downloadapk-tools-ab37bd0b0c0da340222f8420ec2ee6ccdd13ce24.tar.gz
apk-tools-ab37bd0b0c0da340222f8420ec2ee6ccdd13ce24.tar.bz2
apk-tools-ab37bd0b0c0da340222f8420ec2ee6ccdd13ce24.tar.xz
apk-tools-ab37bd0b0c0da340222f8420ec2ee6ccdd13ce24.zip
db: speed up fdb creation
avoid recalculating hashes, and store the lengths of names, so we can optimize some operations.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 31f83f2..4235c56 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -30,7 +30,8 @@ struct apk_db_file {
struct apk_db_dir_instance *diri;
csum_t csum;
- char filename[];
+ unsigned short namelen;
+ char name[];
};
#define APK_DBDIRF_PROTECTED 0x0001
@@ -44,7 +45,8 @@ struct apk_db_dir {
unsigned short refs;
unsigned short flags;
- char dirname[];
+ unsigned short namelen;
+ char name[];
};
struct apk_db_dir_instance {