• uriyage's avatar
    Try to trim strings only when applicable (#11817) · 9d336ac3
    uriyage authored
    
    
    As `sdsRemoveFreeSpace` have an impact on performance even if it is a no-op (see details at #11508). 
    Only call the function when there is a possibility that the string contains free space.
    * For strings coming from the network, it's only if they're bigger than PROTO_MBULK_BIG_ARG
    * For strings coming from scripts, it's only if they're smaller than LUA_CMD_OBJCACHE_MAX_LEN
    * For strings coming from modules, it could be anything.
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    Co-authored-by: default avatarsundb <sundbcn@gmail.com>
    9d336ac3
scripting.tcl 71.4 KB