mirror of
https://github.com/golang/net.git
synced 2026-04-01 02:47:08 +09:00
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>