From inspecting the Ruedis API, they are allocating in the same way as the other popular libaries. There is no way (that I can tell) to stream a large blob from Redis into a Writer of your choosing, so you're always going to allocate the size of the object + miss out on concurrency.
Edit: clarified that I'm referring to ruedis and not redjet
To minimize allocations, call (*Result).WriteTo instead of (*Result).Bytes. WriteTo streams the response directly to an io.Writer such as a file or HTTP response.
4 comments
[ 3.0 ms ] story [ 17.3 ms ] threadFrom inspecting the Ruedis API, they are allocating in the same way as the other popular libaries. There is no way (that I can tell) to stream a large blob from Redis into a Writer of your choosing, so you're always going to allocate the size of the object + miss out on concurrency.
Edit: clarified that I'm referring to ruedis and not redjet