mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Remove useful check from tryObjectEncoding().
We are sure the string is large, since when the sds optimization branch is entered it means that it was not possible to encode it as EMBSTR for size concerns.
This commit is contained in:
parent
38b2e65e15
commit
8811d49009
@ -372,8 +372,7 @@ robj *tryObjectEncoding(robj *o) {
|
||||
* We do that only for relatively large strings as this branch
|
||||
* is only entered if the length of the string is greater than
|
||||
* REDIS_ENCODING_EMBSTR_SIZE_LIMIT. */
|
||||
if (len > 64 &&
|
||||
o->encoding == REDIS_ENCODING_RAW &&
|
||||
if (o->encoding == REDIS_ENCODING_RAW &&
|
||||
sdsavail(s) > len/10)
|
||||
{
|
||||
o->ptr = sdsRemoveFreeSpace(o->ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user