[net] net/http2: pool transport gzip readers

6 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Oct 8, 2025, 12:43:16 PM (7 days ago) Oct 8
to goph...@pubsubhelper.golang.org, Alexander Yastrebov, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

net/http2: pool transport gzip readers

This is a copy of the CL 510255 with the difference that it preserves use of fs.ErrClosed when reading after close.

Updates golang/go#61353
Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
GitHub-Last-Rev: 5e48e8141fb1658503e056d69b109a03fb685a03
GitHub-Pull-Request: golang/net#239

Change diff

diff --git a/http2/transport.go b/http2/transport.go
index be759b6..1965913 100644
--- a/http2/transport.go
+++ b/http2/transport.go
@@ -9,6 +9,7 @@
import (
"bufio"
"bytes"
+ "compress/flate"
"compress/gzip"
"context"
"crypto/rand"
@@ -3076,35 +3077,102 @@
func (rt erringRoundTripper) RoundTripErr() error { return rt.err }
func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err }

+var errConcurrentReadOnResBody = errors.New("http2: concurrent read on response body")
+
// gzipReader wraps a response body so it can lazily
-// call gzip.NewReader on the first call to Read
+// get gzip.Reader from the pool on the first call to Read.
+// After Close is called it puts gzip.Reader to the pool immediately
+// if there is no Read in progress or later when Read completes.
type gzipReader struct {
_ incomparable
body io.ReadCloser // underlying Response.Body
- zr *gzip.Reader // lazily-initialized gzip reader
- zerr error // sticky error
+ mu sync.Mutex // guards zr and zerr
+ zr *gzip.Reader // stores gzip reader from the pool between reads
+ zerr error // sticky gzip reader init error or sentinel value to detect concurrent read and read after close
+}
+
+type eofReader struct{}
+
+func (eofReader) Read([]byte) (int, error) { return 0, io.EOF }
+func (eofReader) ReadByte() (byte, error) { return 0, io.EOF }
+
+var gzipPool = sync.Pool{New: func() any { return new(gzip.Reader) }}
+
+// gzipPoolGet gets a gzip.Reader from the pool and resets it to read from r.
+func gzipPoolGet(r io.Reader) (*gzip.Reader, error) {
+ zr := gzipPool.Get().(*gzip.Reader)
+ if err := zr.Reset(r); err != nil {
+ gzipPoolPut(zr)
+ return nil, err
+ }
+ return zr, nil
+}
+
+// gzipPoolPut puts a gzip.Reader back into the pool.
+func gzipPoolPut(zr *gzip.Reader) {
+ // Reset will allocate bufio.Reader if we pass it anything
+ // other than a flate.Reader, so ensure that it's getting one.
+ var r flate.Reader = eofReader{}
+ zr.Reset(r)
+ gzipPool.Put(zr)
+}
+
+// acquire returns a gzip.Reader for reading response body.
+// The reader must be released after use.
+func (gz *gzipReader) acquire() (*gzip.Reader, error) {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr != nil {
+ return nil, gz.zerr
+ }
+ if gz.zr == nil {
+ gz.zr, gz.zerr = gzipPoolGet(gz.body)
+ if gz.zerr != nil {
+ return nil, gz.zerr
+ }
+ }
+ ret := gz.zr
+ gz.zr, gz.zerr = nil, errConcurrentReadOnResBody
+ return ret, nil
+}
+
+// release returns the gzip.Reader to the pool if Close was called during Read.
+func (gz *gzipReader) release(zr *gzip.Reader) {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr == errConcurrentReadOnResBody {
+ gz.zr, gz.zerr = zr, nil
+ } else { // fs.ErrClosed
+ gzipPoolPut(zr)
+ }
+}
+
+// close returns the gzip.Reader to the pool immediately or
+// signals release to do so after Read completes.
+func (gz *gzipReader) close() {
+ gz.mu.Lock()
+ defer gz.mu.Unlock()
+ if gz.zerr == nil && gz.zr != nil {
+ gzipPoolPut(gz.zr)
+ gz.zr = nil
+ }
+ gz.zerr = fs.ErrClosed
}

func (gz *gzipReader) Read(p []byte) (n int, err error) {
- if gz.zerr != nil {
- return 0, gz.zerr
+ zr, err := gz.acquire()
+ if err != nil {
+ return 0, err
}
- if gz.zr == nil {
- gz.zr, err = gzip.NewReader(gz.body)
- if err != nil {
- gz.zerr = err
- return 0, err
- }
- }
- return gz.zr.Read(p)
+ defer gz.release(zr)
+
+ return zr.Read(p)
}

func (gz *gzipReader) Close() error {
- if err := gz.body.Close(); err != nil {
- return err
- }
- gz.zerr = fs.ErrClosed
- return nil
+ gz.close()
+
+ return gz.body.Close()
}

type errorReader struct{ err error }

Change information

Files:
  • M http2/transport.go
Change size: M
Delta: 1 file changed, 86 insertions(+), 18 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: net
Gerrit-Branch: master
Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
Gerrit-Change-Number: 710235
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Gopher Robot (Gerrit)

unread,
Oct 8, 2025, 12:43:18 PM (7 days ago) Oct 8
to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gopher Robot added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Gopher Robot . unresolved

I spotted some possible problems with your PR:

  1. You have a long 115 character line in the commit message body. Please add line breaks to long lines that should be wrapped. Lines in the commit message body should be wrapped at ~76 characters unless needed for things like URLs or tables. (Note: GitHub might render long lines as soft-wrapped, so double-check in the Gerrit commit message shown above.)

Please address any problems by updating the GitHub PR.

When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above. These findings are based on heuristics; if a finding does not apply, briefly reply here saying so.

To update the commit title or commit message body shown here in Gerrit, you must edit the GitHub PR title and PR description (the first comment) in the GitHub web interface using the 'Edit' button or 'Edit' menu entry there. Note: pushing a new commit to the PR will not automatically update the commit message used by Gerrit.

For more details, see:

(In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: net
    Gerrit-Branch: master
    Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
    Gerrit-Change-Number: 710235
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Wed, 08 Oct 2025 16:43:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Alexander Yastrebov (Gerrit)

    unread,
    Oct 8, 2025, 12:49:09 PM (7 days ago) Oct 8
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Gopher Robot, golang-co...@googlegroups.com

    Alexander Yastrebov added 1 comment

    Patchset-level comments
    Gopher Robot . resolved

    I spotted some possible problems with your PR:

      1. You have a long 115 character line in the commit message body. Please add line breaks to long lines that should be wrapped. Lines in the commit message body should be wrapped at ~76 characters unless needed for things like URLs or tables. (Note: GitHub might render long lines as soft-wrapped, so double-check in the Gerrit commit message shown above.)

    Please address any problems by updating the GitHub PR.

    When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above. These findings are based on heuristics; if a finding does not apply, briefly reply here saying so.

    To update the commit title or commit message body shown here in Gerrit, you must edit the GitHub PR title and PR description (the first comment) in the GitHub web interface using the 'Edit' button or 'Edit' menu entry there. Note: pushing a new commit to the PR will not automatically update the commit message used by Gerrit.

    For more details, see:

    (In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

    Alexander Yastrebov

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: net
      Gerrit-Branch: master
      Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
      Gerrit-Change-Number: 710235
      Gerrit-PatchSet: 1
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-Comment-Date: Wed, 08 Oct 2025 16:49:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Gopher Robot <go...@golang.org>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Gerrit Bot (Gerrit)

      unread,
      Oct 8, 2025, 12:51:08 PM (7 days ago) Oct 8
      to Alexander Yastrebov, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Gerrit Bot uploaded new patchset

      Gerrit Bot uploaded patch set #2 to this change.
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: net
      Gerrit-Branch: master
      Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
      Gerrit-Change-Number: 710235
      Gerrit-PatchSet: 2
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Sean Liao (Gerrit)

      unread,
      Oct 8, 2025, 4:33:03 PM (7 days ago) Oct 8
      to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, Damien Neil, Tom Bergan, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Damien Neil and Tom Bergan

      Sean Liao voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Damien Neil
      • Tom Bergan
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: net
      Gerrit-Branch: master
      Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
      Gerrit-Change-Number: 710235
      Gerrit-PatchSet: 2
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Damien Neil <dn...@google.com>
      Gerrit-Reviewer: Sean Liao <se...@liao.dev>
      Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
      Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-Attention: Tom Bergan <tomb...@google.com>
      Gerrit-Attention: Damien Neil <dn...@google.com>
      Gerrit-Comment-Date: Wed, 08 Oct 2025 20:32:55 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Sean Liao (Gerrit)

      unread,
      Oct 9, 2025, 7:10:23 PM (6 days ago) Oct 9
      to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Damien Neil, Tom Bergan, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Alexander Yastrebov

      Sean Liao added 1 comment

      Commit Message
      Line 11, Patchset 2 (Latest):
      Sean Liao . unresolved

      Since they're different code paths, I think this needs a benchmark

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Yastrebov
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: net
        Gerrit-Branch: master
        Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
        Gerrit-Change-Number: 710235
        Gerrit-PatchSet: 2
        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Sean Liao <se...@liao.dev>
        Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
        Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-Attention: Alexander Yastrebov <yastreb...@gmail.com>
        Gerrit-Comment-Date: Thu, 09 Oct 2025 23:10:16 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Alexander Yastrebov (Gerrit)

        unread,
        Oct 10, 2025, 8:43:55 AM (6 days ago) Oct 10
        to Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Damien Neil, Tom Bergan, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Sean Liao

        Alexander Yastrebov added 1 comment

        Commit Message
        Sean Liao . resolved

        Since they're different code paths, I think this needs a benchmark

        Alexander Yastrebov

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Sean Liao
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: net
          Gerrit-Branch: master
          Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
          Gerrit-Change-Number: 710235
          Gerrit-PatchSet: 2
          Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Sean Liao <se...@liao.dev>
          Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
          Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-Attention: Sean Liao <se...@liao.dev>
          Gerrit-Comment-Date: Fri, 10 Oct 2025 12:43:45 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Sean Liao <se...@liao.dev>
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Gerrit Bot (Gerrit)

          unread,
          Oct 10, 2025, 8:47:35 AM (6 days ago) Oct 10
          to Alexander Yastrebov, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Damien Neil, Sean Liao and Tom Bergan

          Gerrit Bot uploaded new patchset

          Gerrit Bot uploaded patch set #3 to this change.
          Following approvals got outdated and were removed:
          • TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Damien Neil
          • Sean Liao
          • Tom Bergan
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: net
            Gerrit-Branch: master
            Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
            Gerrit-Change-Number: 710235
            Gerrit-PatchSet: 3
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Damien Neil <dn...@google.com>
            Gerrit-Reviewer: Sean Liao <se...@liao.dev>
            Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
            Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Sean Liao <se...@liao.dev>
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Sean Liao (Gerrit)

            unread,
            Oct 12, 2025, 1:26:13 PM (3 days ago) Oct 12
            to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, Go LUCI, Damien Neil, Tom Bergan, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Damien Neil and Tom Bergan

            Sean Liao voted

            Code-Review+2
            Commit-Queue+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Damien Neil
            • Tom Bergan
            Submit Requirements:
            • requirement satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: net
            Gerrit-Branch: master
            Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
            Gerrit-Change-Number: 710235
            Gerrit-PatchSet: 3
            Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
            Gerrit-Reviewer: Damien Neil <dn...@google.com>
            Gerrit-Reviewer: Sean Liao <se...@liao.dev>
            Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
            Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Tom Bergan <tomb...@google.com>
            Gerrit-Attention: Damien Neil <dn...@google.com>
            Gerrit-Comment-Date: Sun, 12 Oct 2025 17:26:03 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Michael Pratt (Gerrit)

            unread,
            Oct 13, 2025, 12:41:18 PM (2 days ago) Oct 13
            to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Damien Neil, Tom Bergan, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Damien Neil and Tom Bergan

            Michael Pratt voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Damien Neil
            • Tom Bergan
            Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: net
              Gerrit-Branch: master
              Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
              Gerrit-Change-Number: 710235
              Gerrit-PatchSet: 3
              Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
              Gerrit-Reviewer: Damien Neil <dn...@google.com>
              Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
              Gerrit-Reviewer: Sean Liao <se...@liao.dev>
              Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
              Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
              Gerrit-CC: Gopher Robot <go...@golang.org>
              Gerrit-Attention: Tom Bergan <tomb...@google.com>
              Gerrit-Attention: Damien Neil <dn...@google.com>
              Gerrit-Comment-Date: Mon, 13 Oct 2025 16:41:15 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Damien Neil (Gerrit)

              unread,
              8:05 PM (4 hours ago) 8:05 PM
              to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, Michael Pratt, Go LUCI, Tom Bergan, Gopher Robot, golang-co...@googlegroups.com
              Attention needed from Tom Bergan

              Damien Neil voted and added 1 comment

              Votes added by Damien Neil

              Auto-Submit+1
              Code-Review+2

              1 comment

              Patchset-level comments
              File-level comment, Patchset 3 (Latest):
              Damien Neil . resolved

              Thanks.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Tom Bergan
              Submit Requirements:
                • requirement satisfiedCode-Review
                • requirement satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                • requirement satisfiedTryBots-Pass
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: net
                Gerrit-Branch: master
                Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
                Gerrit-Change-Number: 710235
                Gerrit-PatchSet: 3
                Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                Gerrit-Reviewer: Damien Neil <dn...@google.com>
                Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
                Gerrit-Reviewer: Sean Liao <se...@liao.dev>
                Gerrit-Reviewer: Tom Bergan <tomb...@google.com>
                Gerrit-CC: Alexander Yastrebov <yastreb...@gmail.com>
                Gerrit-CC: Gopher Robot <go...@golang.org>
                Gerrit-Attention: Tom Bergan <tomb...@google.com>
                Gerrit-Comment-Date: Thu, 16 Oct 2025 00:05:02 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Gopher Robot (Gerrit)

                unread,
                8:07 PM (4 hours ago) 8:07 PM
                to Alexander Yastrebov, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Damien Neil, Michael Pratt, Go LUCI, Tom Bergan, golang-co...@googlegroups.com

                Gopher Robot submitted the change

                Change information

                Commit message:
                net/http2: pool transport gzip readers

                This is a copy of the CL 510255 with the difference that
                it preserves use of fs.ErrClosed when reading after close.

                goos: darwin
                goarch: arm64
                pkg: golang.org/x/net/http2
                cpu: Apple M4
                │ HEAD~1 │ HEAD │
                │ sec/op │ sec/op vs base │
                ClientGzip-10 752.8µ ± 1% 750.7µ ± 2% ~ (p=0.393 n=10)

                │ HEAD~1 │ HEAD │
                │ B/op │ B/op vs base │
                ClientGzip-10 75.49Ki ± 0% 33.98Ki ± 3% -54.99% (p=0.000 n=10)

                │ HEAD~1 │ HEAD │
                │ allocs/op │ allocs/op vs base │
                ClientGzip-10 705.0 ± 0% 698.5 ± 0% -0.92% (p=0.000 n=10)

                Updates golang/go#61353
                Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
                GitHub-Last-Rev: 4d04dc93f37ec6cdaf36c6851250806166f4e8c1
                GitHub-Pull-Request: golang/net#239
                Reviewed-by: Sean Liao <se...@liao.dev>
                Reviewed-by: Michael Pratt <mpr...@google.com>
                Reviewed-by: Damien Neil <dn...@google.com>
                Auto-Submit: Damien Neil <dn...@google.com>
                Files:
                • M http2/transport.go
                • M http2/transport_test.go
                Change size: M
                Delta: 2 files changed, 138 insertions(+), 18 deletions(-)
                Branch: refs/heads/master
                Submit Requirements:
                • requirement satisfiedCode-Review: +1 by Michael Pratt, +2 by Sean Liao, +2 by Damien Neil
                • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
                Open in Gerrit
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: merged
                Gerrit-Project: net
                Gerrit-Branch: master
                Gerrit-Change-Id: I0fdc0c0a5947d27dcc615e5bcf4d4620c2c95d9e
                Gerrit-Change-Number: 710235
                Gerrit-PatchSet: 4
                Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
                Gerrit-Reviewer: Damien Neil <dn...@google.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                open
                diffy
                satisfied_requirement
                Reply all
                Reply to author
                Forward
                0 new messages