diff options
author | antirez <antirez@gmail.com> | 2020-04-09 10:24:10 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-04-09 10:24:46 +0200 |
commit | 30adc62232b2f8fe7dc31b850d8df3979f443234 (patch) | |
tree | d317a4692e3eb36aa8218f7c77d905b2d1bbfce2 /src/redis-check-rdb.c | |
parent | 96688aa6462f330dfd4780d222ce4806d766ff33 (diff) | |
download | redis-30adc62232b2f8fe7dc31b850d8df3979f443234.tar.gz |
RDB: load files faster avoiding useless free+realloc.
Reloading of the RDB generated by
DEBUG POPULATE 5000000
SAVE
is now 25% faster.
This commit also prepares the ability to have more flexibility when
loading stuff from the RDB, since we no longer use dbAdd() but can
control exactly how things are added in the database.
Diffstat (limited to 'src/redis-check-rdb.c')
-rw-r--r-- | src/redis-check-rdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-check-rdb.c b/src/redis-check-rdb.c index 1210d49b4..17ec656ce 100644 --- a/src/redis-check-rdb.c +++ b/src/redis-check-rdb.c @@ -287,7 +287,7 @@ int redis_check_rdb(char *rdbfilename, FILE *fp) { rdbstate.keys++; /* Read value */ rdbstate.doing = RDB_CHECK_DOING_READ_OBJECT_VALUE; - if ((val = rdbLoadObject(type,&rdb,key)) == NULL) goto eoferr; + if ((val = rdbLoadObject(type,&rdb,key->ptr)) == NULL) goto eoferr; /* Check if the key already expired. */ if (expiretime != -1 && expiretime < now) rdbstate.already_expired++; |