Commit a1684ff1 authored by antirez's avatar antirez
Browse files

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.
parent 5beec974
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment