From a1684ff1bbd9b6023f16ad697ab12e29a987e6b8 Mon Sep 17 00:00:00 2001
From: antirez <antirez@gmail.com>
Date: Fri, 10 Jun 2016 10:15:37 +0200
Subject: [PATCH] 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.
---
 src/t_list.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/t_list.c b/src/t_list.c
index 109aba9d0..f9969fa2e 100644
--- a/src/t_list.c
+++ b/src/t_list.c
@@ -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) {