thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [thrift] dcelasun opened a new pull request #2246: go: Use sync.Pool for gzip in HTTP transport
Date Tue, 29 Sep 2020 21:27:14 GMT

dcelasun opened a new pull request #2246:
URL: https://github.com/apache/thrift/pull/2246


   b67cad4 introduced transparent gzip support for the HTTP transport but
   calling gzip.NewWriter() with every request causes a large number of
   memory allocations [1] and can create GC pressure.
   
   Avoid this issue by using a sync.Pool for gzip writers.
   
   [1] https://old.reddit.com/r/golang/comments/9uejp4/usage_of_syncpool_for_gzipwriter_in_http_handlers/e94jh8c/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message