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

Issue 79110043: code review 79110043: bufio: improve ReadFrom

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by ruiu
Modified:
9 years, 4 months ago
Reviewers:
CC:
golang-codereviews, gobot, rsc, pongad, dave_cheney.net, gri
Visibility:
Public.

Description

bufio: improve ReadFrom Writer.ReadFrom currently uses underlying writer's ReadFrom method only when internal buffer is empty. Also, it does not utilize given Reader's WriteTo method even if it implements WriterTo. It's not optional. This patch is to use underlying value's ReadFrom and WriteTo methods as long as they are available.

Patch Set 1 #

Patch Set 2 : diff -r 3ca54dd30864 https://code.google.com/p/go #

Patch Set 3 : diff -r 3ca54dd30864 https://code.google.com/p/go #

Patch Set 4 : diff -r 3ca54dd30864 https://code.google.com/p/go #

Total comments: 2

Patch Set 5 : code review 79110043: bufio: improve ReadFrom #

Patch Set 6 : diff -r c5f72a685e25 https://code.google.com/p/go #

Patch Set 7 : diff -r c5f72a685e25 https://code.google.com/p/go #

Patch Set 8 : diff -r 8e05add24c7e https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -9 lines) Patch
M src/pkg/bufio/bufio.go View 1 2 3 4 5 6 7 1 chunk +12 lines, -3 lines 0 comments Download
M src/pkg/bufio/bufio_test.go View 1 2 3 4 5 6 7 4 chunks +34 lines, -6 lines 0 comments Download

Messages

Total messages: 21
ruiu
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 1 month ago (2014-03-22 23:03:17 UTC) #1
r
We're in a feature freeze for 1.3. Please ping us after the 1.3 release.
10 years, 1 month ago (2014-03-26 05:04:06 UTC) #2
r
10 years, 1 month ago (2014-03-26 05:04:15 UTC) #3
gobot
R=rsc@golang.org (assigned by r@golang.org)
9 years, 10 months ago (2014-06-16 20:10:00 UTC) #4
ruiu
Ping.
9 years, 10 months ago (2014-07-02 01:00:20 UTC) #5
rsc
test, sorry
9 years, 10 months ago (2014-07-02 01:15:47 UTC) #6
rsc
https://1349-161c4bc39310-tainted-dot-codereview.appspot.com/79110043/diff/60001/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (left): https://1349-161c4bc39310-tainted-dot-codereview.appspot.com/79110043/diff/60001/src/pkg/bufio/bufio.go#oldcode628 src/pkg/bufio/bufio.go:628: m, err = r.Read(b.buf[b.n:]) It seems to me that ...
9 years, 10 months ago (2014-07-02 01:22:08 UTC) #7
rsc
another test, sorry
9 years, 10 months ago (2014-07-02 01:31:54 UTC) #8
rsc
final test for now, sorry
9 years, 10 months ago (2014-07-02 01:41:16 UTC) #9
ruiu
Thank you for reviewing. PTAL. https://codereview.appspot.com/79110043/diff/60001/src/pkg/bufio/bufio.go File src/pkg/bufio/bufio.go (left): https://codereview.appspot.com/79110043/diff/60001/src/pkg/bufio/bufio.go#oldcode628 src/pkg/bufio/bufio.go:628: m, err = r.Read(b.buf[b.n:]) ...
9 years, 10 months ago (2014-07-02 23:54:00 UTC) #10
pongad
This only partly addresses the issue discussed in https://groups.google.com/forum/#!msg/golang-nuts/oYYggbLntVE/DMsqEyIU-yIJ Though I think if you move ...
9 years, 10 months ago (2014-07-03 04:41:42 UTC) #11
ruiu
On 2014/07/03 04:41:42, pongad wrote: > This only partly addresses the issue discussed in > ...
9 years, 10 months ago (2014-07-03 23:30:04 UTC) #12
pongad
You are right; my fears are banished. I'm a little surprised that SmallChunks benchmark got ...
9 years, 10 months ago (2014-07-05 23:01:56 UTC) #13
dave_cheney.net
On 2014/07/05 23:01:56, pongad wrote: > You are right; my fears are banished. > > ...
9 years, 9 months ago (2014-07-16 10:06:35 UTC) #14
bradfitz
R=gri ... since he's expressed concerns about the bufio package most recently.
9 years, 9 months ago (2014-07-16 18:00:34 UTC) #15
gri
This seems unrelated to issue 7611 which has been fixed before. At least the CL ...
9 years, 9 months ago (2014-07-16 21:38:59 UTC) #16
ruiu
Updated both the CL description and the test. The test now correctly test my change ...
9 years, 9 months ago (2014-07-17 05:16:09 UTC) #17
gri
The test still does not test the change. If I remove the bufio.go changes and ...
9 years, 9 months ago (2014-07-21 18:11:53 UTC) #18
gobot
R=gri@golang.org (assigned by satish.puranam@gmail.com)
9 years, 7 months ago (2014-09-28 05:24:50 UTC) #19
gri
This CL needs to be updated first to match the new directory structure (no pkg ...
9 years, 7 months ago (2014-09-30 17:49:50 UTC) #20
gobot
9 years, 4 months ago (2014-12-19 05:18:32 UTC) #21
R=close

To the author of this CL:

The Go project has moved to Gerrit Code Review.

If this CL should be continued, please see the latest version of
https://golang.org/doc/contribute.html for instructions on
how to set up Git and the Go project's Gerrit codereview plugin,
and then create a new change with your current code.

If there has been discussion on this CL, please give a link to it
(golang.org/cl/79110043 is best) in the description in your
new CL.

Thanks very much.
Sign in to reply to this message.

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