LZF compression re-enabled by default, but with INIT_HTAB set to 0 to avoid the very costly memset initialization. Note that with this option set valgrind will output some false positive about lzf_c.c

This commit is contained in:
antirez 2009-12-16 15:48:57 -05:00
parent 121f70cfae
commit b055378971
3 changed files with 6 additions and 6 deletions

2
lzfP.h
View File

@ -88,7 +88,7 @@
* deterministic/repeatable when the configuration otherwise is the same). * deterministic/repeatable when the configuration otherwise is the same).
*/ */
#ifndef INIT_HTAB #ifndef INIT_HTAB
# define INIT_HTAB 1 # define INIT_HTAB 0
#endif #endif
/* /*

View File

@ -1142,7 +1142,7 @@ static void initServerConfig() {
server.appendfilename = "appendonly.aof"; server.appendfilename = "appendonly.aof";
server.requirepass = NULL; server.requirepass = NULL;
server.shareobjects = 0; server.shareobjects = 0;
server.rdbcompression = 0; server.rdbcompression = 1;
server.sharingpoolsize = 1024; server.sharingpoolsize = 1024;
server.maxclients = 0; server.maxclients = 0;
server.maxmemory = 0; server.maxmemory = 0;

View File

@ -54,10 +54,10 @@ save 300 10
save 60 10000 save 60 10000
# Compress string objects using LZF when dump .rdb databases? # Compress string objects using LZF when dump .rdb databases?
# For default that's set to 'no' because uses too much CPU time. # For default that's set to 'yes' as it's almost always a win.
# You want to switch this to 'yes' only if you have a lot of very compressible # If you want to save some CPU in the saving child set it to 'no' but
# data inside your dataset and are using replication. # the dataset will likely be bigger if you have compressible values or keys.
rdbcompression no rdbcompression yes
# The filename where to dump the DB # The filename where to dump the DB
dbfilename dump.rdb dbfilename dump.rdb