Commit ed437b82 authored by spinlock's avatar spinlock Committed by antirez
Browse files

Optimize addReplyBulkSds for better performance

parent 4ebfe265
......@@ -561,8 +561,7 @@ void addReplyBulkCBuffer(client *c, const void *p, size_t len) {
/* Add sds to reply (takes ownership of sds and frees it) */
void addReplyBulkSds(client *c, sds s) {
addReplySds(c,sdscatfmt(sdsempty(),"$%u\r\n",
(unsigned long)sdslen(s)));
addReplyLongLongWithPrefix(c,sdslen(s),'$');
addReplySds(c,s);
addReply(c,shared.crlf);
}
......
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