-
Notifications
You must be signed in to change notification settings - Fork 18.1k
encoding/json: don't reset before returning buffer to pool #34195
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
Conversation
This PR (HEAD: d9df74a) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/194338 to see it. Tip: You can toggle comments from me using the |
Message from Andreas Goetz: Patch Set 1: Kindly asking for review as you've done on c054747 Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Brad Fitzpatrick: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=62f068c3 Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Gobot Gobot: Patch Set 1: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Brad Fitzpatrick: Patch Set 1: R=mvdan This seems consistent with the other usage of the pool in stream.go. Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Emmanuel Odeke: Patch Set 1: Decent benchmark numbers from this change in encoding/json: name old time/op new time/op delta name old speed new speed delta name old alloc/op new alloc/op delta name old allocs/op new allocs/op delta Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Daniel Martí: Patch Set 1: Do you think this is better than CL 183228? If not, let's focus on that CL instead. Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Message from Andreas Goetz: Patch Set 1:
It's a three line problem, so not much possible difference. I think this CL is "better" in that its puts the reset logic in a single place while in CL 183228 its scattered around pool consumers. This one has 1 line less code. Whatever CL implements this change the form of this one is slightly cleaner imho. Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
Reset is already performed when retrieving from pool Change-Id: Ia810dd18d3e55a1565a5ad435a00d1e46724576c GitHub-Last-Rev: d9df74a GitHub-Pull-Request: #34195 Reviewed-on: https://go-review.googlesource.com/c/go/+/194338 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
Message from Daniel Martí: Patch Set 1: Code-Review+2 I agree this is slightly better. And like Brad says, more consistent. LGTM Please don’t reply on this GitHub thread. Visit golang.org/cl/194338. |
This PR is being closed because golang.org/cl/194338 has been merged. |
Reset is already performed when retrieving from pool Change-Id: Ia810dd18d3e55a1565a5ad435a00d1e46724576c GitHub-Last-Rev: d9df74a4aeb86e5d292c9fc33568a3c9a64a967d GitHub-Pull-Request: golang/go#34195 Reviewed-on: https://go-review.googlesource.com/c/go/+/194338 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
Reset is already performed when retrieving from pool Change-Id: Ia810dd18d3e55a1565a5ad435a00d1e46724576c GitHub-Last-Rev: d9df74a4aeb86e5d292c9fc33568a3c9a64a967d GitHub-Pull-Request: golang/go#34195 Reviewed-on: https://go-review.googlesource.com/c/go/+/194338 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
Reset is already performed when retrieving from pool Change-Id: Ia810dd18d3e55a1565a5ad435a00d1e46724576c GitHub-Last-Rev: d9df74a4aeb86e5d292c9fc33568a3c9a64a967d GitHub-Pull-Request: golang/go#34195 Reviewed-on: https://go-review.googlesource.com/c/go/+/194338 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
Reset is already performed when retrieving from pool Change-Id: Ia810dd18d3e55a1565a5ad435a00d1e46724576c GitHub-Last-Rev: d9df74a4aeb86e5d292c9fc33568a3c9a64a967d GitHub-Pull-Request: golang/go#34195 Reviewed-on: https://go-review.googlesource.com/c/go/+/194338 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
Reset is already performed when retrieving from pool