Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ed437b82
Commit
ed437b82
authored
Jul 05, 2017
by
spinlock
Committed by
antirez
Jul 06, 2017
Browse files
Optimize addReplyBulkSds for better performance
parent
4ebfe265
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
ed437b82
...
@@ -561,8 +561,7 @@ void addReplyBulkCBuffer(client *c, const void *p, size_t len) {
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment