mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 16:48:27 -05:00
Optimize addReplyBulkSds for better performance
This commit is contained in:
parent
09dd7b5ff0
commit
ea31a4eae3
@ -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) */
|
/* Add sds to reply (takes ownership of sds and frees it) */
|
||||||
void addReplyBulkSds(client *c, sds s) {
|
void addReplyBulkSds(client *c, sds s) {
|
||||||
addReplySds(c,sdscatfmt(sdsempty(),"$%u\r\n",
|
addReplyLongLongWithPrefix(c,sdslen(s),'$');
|
||||||
(unsigned long)sdslen(s)));
|
|
||||||
addReplySds(c,s);
|
addReplySds(c,s);
|
||||||
addReply(c,shared.crlf);
|
addReply(c,shared.crlf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user