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

Issue 12708046: code review 12708046: net/http: simplify server, use bufio Reader.Reset and W... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by bradfitz
Modified:
10 years, 8 months ago
Reviewers:
r, dsymonds
CC:
golang-dev, r
Visibility:
Public.

Description

net/http: simplify server, use bufio Reader.Reset and Writer.Reset Update issue 5100 Update issue 6086 Remove switchReader, switchWriter, switchReaderPair, switchWriterPair, etc. Now it only maintains pools of bufio Readers and Writers, but uses Reset instead of working around all their previously-associated state. Compared to before the bufio Reset change, it's the same number of allocations, and also faster: benchmark old ns/op new ns/op delta BenchmarkClientServer 111218 109828 -1.25% BenchmarkClientServerParallel4 70580 70013 -0.80% BenchmarkClientServerParallel64 72636 68919 -5.12% BenchmarkServer 139858 137068 -1.99% BenchmarkServerFakeConnNoKeepAlive 14619 14314 -2.09% BenchmarkServerFakeConnWithKeepAlive 12390 11361 -8.31% BenchmarkServerFakeConnWithKeepAliveLite 7630 7306 -4.25% BenchmarkServerHandlerTypeLen 9688 9342 -3.57% BenchmarkServerHandlerNoLen 8700 8470 -2.64% BenchmarkServerHandlerNoType 9255 8949 -3.31% BenchmarkServerHandlerNoHeader 7058 6806 -3.57% benchmark old allocs new allocs delta BenchmarkClientServer 61 61 0.00% BenchmarkClientServerParallel4 61 61 0.00% BenchmarkClientServerParallel64 61 61 0.00% BenchmarkServer 16 16 0.00% BenchmarkServerFakeConnNoKeepAlive 24 24 0.00% BenchmarkServerFakeConnWithKeepAlive 19 19 0.00% BenchmarkServerFakeConnWithKeepAliveLite 9 9 0.00% BenchmarkServerHandlerTypeLen 17 17 0.00% BenchmarkServerHandlerNoLen 14 14 0.00% BenchmarkServerHandlerNoType 15 15 0.00% BenchmarkServerHandlerNoHeader 9 9 0.00% benchmark old bytes new bytes delta BenchmarkClientServer 6988 6985 -0.04% BenchmarkClientServerParallel4 6979 6985 0.09% BenchmarkClientServerParallel64 7002 7019 0.24% BenchmarkServer 1846 1848 0.11% BenchmarkServerFakeConnNoKeepAlive 2420 2412 -0.33% BenchmarkServerFakeConnWithKeepAlive 2126 2129 0.14% BenchmarkServerFakeConnWithKeepAliveLite 989 990 0.10% BenchmarkServerHandlerTypeLen 1818 1819 0.06% BenchmarkServerHandlerNoLen 1775 1777 0.11% BenchmarkServerHandlerNoType 1783 1785 0.11% BenchmarkServerHandlerNoHeader 989 990 0.10%

Patch Set 1 #

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

Patch Set 3 : diff -r d70c9a6579ca https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r b302ea285b42 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -57 lines) Patch
M src/pkg/net/http/server.go View 1 6 chunks +24 lines, -57 lines 0 comments Download

Messages

Total messages: 6
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 8 months ago (2013-08-10 23:21:16 UTC) #1
r
Another "issue" tip: As I understand it, the way Update works is that it adds ...
10 years, 8 months ago (2013-08-10 23:23:34 UTC) #2
r
LGTM
10 years, 8 months ago (2013-08-10 23:23:58 UTC) #3
bradfitz
*** Submitted as https://code.google.com/p/go/source/detail?r=c9a524602786 *** net/http: simplify server, use bufio Reader.Reset and Writer.Reset Update issue ...
10 years, 8 months ago (2013-08-11 02:22:39 UTC) #4
r
More detail to help me remember. Your CL said Update issue 5100 Update issue 6086 ...
10 years, 8 months ago (2013-08-11 03:14:55 UTC) #5
dsymonds
10 years, 8 months ago (2013-08-11 05:29:55 UTC) #6
Sign in to reply to this message.

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