mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Streams: reduce listpack max size to 2k to speedup range queries.
Listpack max size is a tradeoff between space and time. A 2k max entry puts the memory usage approximately at a similar order of magnitude (5 million entries went from 96 to 120 MB), but the range queries speed doubled (because there are half entries to scan in the average case). Lower values could be considered, or maybe this parameter should be made tunable.
This commit is contained in:
parent
f24d3a7de0
commit
0c00fd7834
@ -31,7 +31,7 @@
|
||||
#include "endianconv.h"
|
||||
#include "stream.h"
|
||||
|
||||
#define STREAM_BYTES_PER_LISTPACK 4096
|
||||
#define STREAM_BYTES_PER_LISTPACK 2048
|
||||
|
||||
/* Every stream item inside the listpack, has a flags field that is used to
|
||||
* mark the entry as deleted, or having the same field as the "master"
|
||||
|
Loading…
Reference in New Issue
Block a user