Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(322)

Issue 9584043: net/http: reduce per-request allocations with responseW...

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by bradfitz
Modified:
11 years ago
Reviewers:
Visibility:
Public.

Description

net/http: reduce per-request allocations with responseWriter wrapper Only generate 8 bytes of garbage ResponseWriter garbage per request, reusing the large state between requests. benchmark old ns/op new ns/op delta BenchmarkServerHandlerTypeLen 8548 8768 +2.57% BenchmarkServerHandlerNoLen 7592 7738 +1.92% BenchmarkServerHandlerNoType 8110 8435 +4.01% BenchmarkServerHandlerNoHeader 5834 5931 +1.66% benchmark old allocs new allocs delta BenchmarkServerHandlerTypeLen 17 17 0.00% BenchmarkServerHandlerNoLen 14 14 0.00% BenchmarkServerHandlerNoType 15 15 0.00% BenchmarkServerHandlerNoHeader 9 8 -11.11% benchmark old bytes new bytes delta BenchmarkServerHandlerTypeLen 1881 1726 -8.24% BenchmarkServerHandlerNoLen 1838 1683 -8.43% BenchmarkServerHandlerNoType 1845 1690 -8.40% BenchmarkServerHandlerNoHeader 1029 807 -21.57% Update Issue 5195

Patch Set 1 #

Patch Set 2 : diff -r d1d76fc0ab6a https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -6 lines) Patch
M src/pkg/net/http/request.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/http/server.go View 1 7 chunks +80 lines, -5 lines 0 comments Download

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b