Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
with golang/net@3bafa33 it still creates lots of garbage, the reason is for requests with no body, putRequestBodyBuf() is never called. Calling it in handlerDone() helps, but it still wastes lots of 64k buffer for requests without body (which is majority). I use this workaround, it saves lots of memory with busy servers: