Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Chi to master to fix large memory allocs #170

merged 2 commits into from Nov 10, 2019


Copy link

markphelps commented Nov 10, 2019

Was doing some benchmarking of memory usage running vegeta and saw that memory allocs were pretty insane for compress/flate.NewWriter (up to 17105 MB) which I tracked down to chi compress middleware. This seems to create a new flate/compressor for each invocation.

Updating to master branch of chi seems to fix this by using a sync.Pool of compressors and reduces memory allocs.


Screen Shot 2019-11-10 at 3 26 13 PM


Screen Shot 2019-11-10 at 3 39 52 PM

markphelps added 2 commits Nov 10, 2019
@markphelps markphelps merged commit 93fa3f3 into master Nov 10, 2019
1 check passed
1 check passed
Test Test
@markphelps markphelps deleted the bump-chi-fix-memory-alloc branch Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.