From 825f65d2bdc86b4efae3d79fd39b0de3343c3474 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 28 Sep 2015 23:25:52 +0200 Subject: [PATCH] Reverse list of clients with pending writes. May potentially improve locality... not exactly clear if this makes a difference or not. But for sure is harmless. --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index 9d4c94d2..9a69f0fb 100644 --- a/src/networking.c +++ b/src/networking.c @@ -177,7 +177,7 @@ int prepareClientToWrite(client *c) { * a system call. We'll only really install the write handler if * we'll not be able to write the whole reply at once. */ c->flags |= CLIENT_PENDING_WRITE; - listAddNodeTail(server.clients_pending_write,c); + listAddNodeHead(server.clients_pending_write,c); } /* Authorize the caller to queue in the output buffer of this client. */