summaryrefslogtreecommitdiff
path: root/deps/hiredis
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-11-08 10:59:35 +0100
committerantirez <antirez@gmail.com>2011-11-08 10:59:59 +0100
commit65330badb97206cd7cf0973d3f2267b0a523c05e (patch)
treec9874d1156b66095d32686bed7f497c369e967d1 /deps/hiredis
parentd5a80182870140ff338c9ad9a35d3698f3911bc1 (diff)
downloadredis-65330badb97206cd7cf0973d3f2267b0a523c05e.tar.gz
hiredis/redis changes for speed with big payloads: read buffer size set
to 16k, request buffer size is no longer destroyed when emtpy and large (better fix needed). Redis clients static output buffer set to 16k as well.
Diffstat (limited to 'deps/hiredis')
-rw-r--r--deps/hiredis/hiredis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/hiredis/hiredis.c b/deps/hiredis/hiredis.c
index b27c63b83..976e94f9c 100644
--- a/deps/hiredis/hiredis.c
+++ b/deps/hiredis/hiredis.c
@@ -520,13 +520,14 @@ void redisReplyReaderFeed(void *reader, const char *buf, size_t len) {
/* Copy the provided buffer. */
if (buf != NULL && len >= 1) {
+#if 0
/* Destroy internal buffer when it is empty and is quite large. */
if (r->len == 0 && sdsavail(r->buf) > 16*1024) {
sdsfree(r->buf);
r->buf = sdsempty();
r->pos = 0;
}
-
+#endif
r->buf = sdscatlen(r->buf,buf,len);
r->len = sdslen(r->buf);
}
@@ -901,7 +902,7 @@ static void __redisCreateReplyReader(redisContext *c) {
* After this function is called, you may use redisContextReadReply to
* see if there is a reply available. */
int redisBufferRead(redisContext *c) {
- char buf[2048];
+ char buf[1024*16];
int nread = read(c->fd,buf,sizeof(buf));
if (nread == -1) {
if (errno == EAGAIN && !(c->flags & REDIS_BLOCK)) {