mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Remove tryObjectEncoding() calls from list type.
All lists are now represented via quicklists. Quicklists are never represented referencing robj structures, so trying to compress their representation does not make sense. That the new way is faster was experimentally verified with micro benchmarks in order to prove that the intuition was correct.
This commit is contained in:
parent
5beec9743e
commit
a1684ff1bb
@ -204,7 +204,6 @@ void pushGenericCommand(client *c, int where) {
|
||||
}
|
||||
|
||||
for (j = 2; j < c->argc; j++) {
|
||||
c->argv[j] = tryObjectEncoding(c->argv[j]);
|
||||
if (!lobj) {
|
||||
lobj = createQuicklistObject();
|
||||
quicklistSetOptions(lobj->ptr, server.list_max_ziplist_size,
|
||||
@ -240,7 +239,6 @@ void pushxGenericCommand(client *c, int where) {
|
||||
checkType(c,subject,OBJ_LIST)) return;
|
||||
|
||||
for (j = 2; j < c->argc; j++) {
|
||||
c->argv[j] = tryObjectEncoding(c->argv[j]);
|
||||
listTypePush(subject,c->argv[j],where);
|
||||
pushed++;
|
||||
}
|
||||
@ -270,7 +268,6 @@ void linsertCommand(client *c) {
|
||||
listTypeEntry entry;
|
||||
int inserted = 0;
|
||||
|
||||
c->argv[4] = tryObjectEncoding(c->argv[4]);
|
||||
if (strcasecmp(c->argv[2]->ptr,"after") == 0) {
|
||||
where = LIST_TAIL;
|
||||
} else if (strcasecmp(c->argv[2]->ptr,"before") == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user