summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-03-02 16:49:11 +0100
committerantirez <antirez@gmail.com>2020-03-05 12:51:14 +0100
commit07dc1b42fb9910bbc9c2c7e22f2feff9183bd0f7 (patch)
tree590d7f27e60363f65f5340dff5da55a6541d769d
parent10e71b3d01eb2e5d37227ca1f79ee6623fae62f2 (diff)
downloadredis-07dc1b42fb9910bbc9c2c7e22f2feff9183bd0f7.tar.gz
Use a smaller getkeys global buffer.
The idea is that very few commands have a lot of keys, and when this happens the allocation time becomes neglegible.
-rw-r--r--src/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.c b/src/db.c
index 6c5d4b4d4..04e26c33b 100644
--- a/src/db.c
+++ b/src/db.c
@@ -1305,7 +1305,7 @@ int expireIfNeeded(redisDb *db, robj *key) {
/* -----------------------------------------------------------------------------
* API to get key arguments from commands
* ---------------------------------------------------------------------------*/
-#define MAX_KEYS_BUFFER 65536
+#define MAX_KEYS_BUFFER 256
static int getKeysTempBuffer[MAX_KEYS_BUFFER];
/* The base case is to use the keys position as given in the command table