summaryrefslogtreecommitdiff
path: root/src/quicklist.h
Commit message (Collapse)AuthorAgeFilesLines
* quicklist: change the len of quicklist to unsigned longzhaozhao.zz2017-12-041-2/+2
|
* quicklist: fix the return value of quicklistCountzhaozhao.zz2017-12-041-1/+1
|
* Use const in Redis Module API where possible.Yossi Gottlieb2016-06-201-1/+1
|
* reduce struct padding by reordering membersoranagra2016-05-161-1/+1
|
* Allow compression of interior quicklist nodesMatt Stancliff2015-01-021-17/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let user set how many nodes to *not* compress. We can specify a compression "depth" of how many nodes to leave uncompressed on each end of the quicklist. Depth 0 = disable compression. Depth 1 = only leave head/tail uncompressed. - (read as: "skip 1 node on each end of the list before compressing") Depth 2 = leave head, head->next, tail->prev, tail uncompressed. - ("skip 2 nodes on each end of the list before compressing") Depth 3 = Depth 2 + head->next->next + tail->prev->prev - ("skip 3 nodes...") etc. This also: - updates RDB storage to use native quicklist compression (if node is already compressed) instead of uncompressing, generating the RDB string, then re-compressing the quicklist node. - internalizes the "fill" parameter for the quicklist so we don't need to pass it to _every_ function. Now it's just a property of the list. - allows a runtime-configurable compression option, so we can expose a compresion parameter in the configuration file if people want to trade slight request-per-second performance for up to 90%+ memory savings in some situations. - updates the quicklist tests to do multiple passes: 200k+ tests now.
* Add adaptive quicklist fill factorMatt Stancliff2015-01-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fill factor now has two options: - negative (1-5) for size-based ziplist filling - positive for length-based ziplist filling with implicit size cap. Negative offsets define ziplist size limits of: -1: 4k -2: 8k -3: 16k -4: 32k -5: 64k Positive offsets now automatically limit their max size to 8k. Any elements larger than 8k will be in individual nodes. Positive ziplist fill factors will keep adding elements to a ziplist until one of: - ziplist has FILL number of elements - or - - ziplist grows above our ziplist max size (currently 8k) When using positive fill factors, if you insert a large element (over 8k), that element will automatically allocate an individual quicklist node with one element and no other elements will be in the same ziplist inside that quicklist node. When using negative fill factors, elements up to the size limit can be added to one quicklist node. If an element is added larger than the max ziplist size, that element will be allocated an individual ziplist in a new quicklist node. Tests also updated to start testing at fill factor -5.
* Add quicklist implementationMatt Stancliff2015-01-021-0/+120
This replaces individual ziplist vs. linkedlist representations for Redis list operations. Big thanks for all the reviews and feedback from everybody in https://github.com/antirez/redis/pull/2143