[HN Gopher] Show HN: Redjet - a high performance Redis library f...
       ___________________________________________________________________
        
       Show HN: Redjet - a high performance Redis library for Go
        
       Author : ammario
       Score  : 8 points
       Date   : 2023-07-05 18:13 UTC (4 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | francislavoie wrote:
       | I don't see a comparison to https://github.com/redis/rueidis
       | which is another officially maintained and faster Go redis
       | client.
        
         | ammario wrote:
         | Good catch.
         | 
         | 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
        
           | daniel-thompson wrote:
           | From https://github.com/ammario/redjet#streaming
           | 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.
        
             | ammario wrote:
             | Sorry, my comment wasn't clear that I was referring to
             | ruedis and not redjet. I edited it.
        
       ___________________________________________________________________
       (page generated 2023-07-05 23:02 UTC)