- 28 Apr, 2014 2 commits
-
-
antirez authored
This commit also fixes a bug in the implementation of sdscatfmt() resulting from stale references to the SDS string header after sdsMakeRoomFor() calls.
-
antirez authored
sdscatprintf() relies on printf() family libc functions and is sometimes too slow in critical code paths. sdscatfmt() is an alternative which is: 1) Far less capable. 2) Format specifier uncompatible. 3) Faster. It is suitable to be used in those speed critical code paths such as CLIENT LIST output generation.
-
- 24 Mar, 2014 2 commits
-
-
antirez authored
For small content the function now tries to use a static buffer to avoid a malloc/free cycle that is too costly when the function is used in the context of performance critical code path such as INFO output generation. This change was verified to have positive effects in the execution speed of the INFO command.
-
antirez authored
sdscatvprintf() uses a loop where it tries to output the formatted string in a buffer of the initial length, if there was not enough room, a buffer of doubled size is tried and so forth. The initial guess for the buffer length was very poor, an hardcoded "16". This caused the printf to be processed multiple times without a good reason. Given that printf functions are already not fast, the overhead was significant. The new heuristic is to use a buffer 4 times the length of the format buffer, and 32 as minimal size. This appears to be a good balance for typical uses of the function inside the Redis code base. This change improved INFO command performances 3 times.
-
- 12 Dec, 2013 1 commit
-
-
codeeply authored
-
- 05 Dec, 2013 1 commit
-
-
antirez authored
-
- 24 Jul, 2013 1 commit
-
-
antirez authored
Actaully the string is modified in-place and a reallocation is never needed, so there is no need to return the new sds string pointer as return value of the function, that is now just "void".
-
- 23 Jul, 2013 1 commit
-
-
antirez authored
-
- 04 Jul, 2013 1 commit
-
-
antirez authored
-
- 06 Mar, 2013 3 commits
-
-
antirez authored
-
antirez authored
This makes programs not checking the return value for NULL much safer since with this change: 1) It is still possible to iterate the zero-length result without crashes. 2) sdssplitargs_free will work against NULL and 0 count.
-
antirez authored
An empty input string also resulted into the function returning NULL making it harder for the caller to distinguish between error and empty string without checking the original input string length.
-
- 19 Jan, 2013 1 commit
-
-
guiquanz authored
-
- 08 Nov, 2012 1 commit
-
-
antirez authored
-
- 30 Mar, 2012 1 commit
-
-
Erik Dubbelboer authored
-
- 14 Mar, 2012 2 commits
- 16 Jan, 2012 2 commits
- 21 Nov, 2011 1 commit
-
-
antirez authored
-
- 02 Nov, 2011 2 commits
- 28 Oct, 2011 1 commit
-
-
antirez authored
-
- 13 Sep, 2011 1 commit
-
-
Pieter Noordhuis authored
-
- 25 May, 2011 1 commit
-
-
antirez authored
Make sure error and status replies emitted by Lua scripts can never have more than a newline, otherwise it is a protocol violation and clients will desync.
-
- 05 May, 2011 2 commits
-
-
Pieter Noordhuis authored
-
Pieter Noordhuis authored
-
- 07 Apr, 2011 1 commit
-
-
antirez authored
-
- 01 Apr, 2011 1 commit
-
-
antirez authored
DUMP implemented, RESTORE and MIGRATE fixed. Use zcalloc() instead of zmalloc()+memset() in sds.c when a new string is created with NULL initialization pointer.
-
- 22 Mar, 2011 1 commit
-
-
antirez authored
-
- 20 Mar, 2011 1 commit
-
-
antirez authored
-
- 27 Jan, 2011 1 commit
-
-
antirez authored
Fixed a theoretical non exploitable security bug reported by @chrisrohlf. In theory if we undefine SDS_ABORT_ON_OOM from sds.c AND modify zmalloc.c in order to don't quit on out of memory (but this would break every other part of Redis), on out of memory there is a possible heap overflow.
-
- 10 Dec, 2010 2 commits
-
-
Pieter Noordhuis authored
-
Pieter Noordhuis authored
Move logic concerned with setting a bit in an sds to the SETBIT command instead of keeping it in sds.c. The function to grow an sds can and will be reused for a command to set a range within a string value.
-
- 09 Dec, 2010 1 commit
-
-
Pieter Noordhuis authored
-
- 23 Sep, 2010 2 commits
- 02 Sep, 2010 1 commit
-
-
Pieter Noordhuis authored
-
- 26 Aug, 2010 1 commit
-
-
Pieter Noordhuis authored
-
- 05 Aug, 2010 1 commit
-
-
antirez authored
-