commit | 84c13af5f4449b859ebfa62d481cce07fedf6da4 | [log] [tgz] |
---|---|---|
author | Tomasz Jezierski <tjomek.jezierski@gmail.com> | Mon Sep 26 23:18:22 2022 +0200 |
committer | Damien Neil <dneil@google.com> | Thu Oct 27 00:09:11 2022 +0000 |
tree | 1c597eb7cd9095b03aed3b2eb0be2fc114635db1 | |
parent | 430a433969d01010c5b12aae4698bcb6d4de8377 [diff] |
http2/hpack: build static table with go generate As the static version of headerFieldTable in hpack is generated in runtime, we may use the go:generate to prepare the struct before the initialization phase. This is supposed to save init time and allocations for many binaries, as net/http imports hpack. Before: init golang.org/x/net/http2/hpack @1.1 ms, 0.097 ms clock, 21240 bytes, 29 allocs After: init golang.org/x/net/http2/hpack @0.67 ms, 0.015 ms clock, 8120 bytes, 9 allocs Fixes golang/go#55881 Change-Id: Ia6575f67ffcba7cc4d75899b24a9c56deb58ccac Reviewed-on: https://go-review.googlesource.com/c/net/+/434875 Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
This repository holds supplementary Go networking libraries.
The easiest way to install is to run go get -u golang.org/x/net
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/net
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.