]> Cypherpunks repositories - gostls13.git/commit
net/http/pprof: remove html/template dependency
authorEgon Elbre <egonelbre@gmail.com>
Wed, 23 Sep 2020 11:06:28 +0000 (14:06 +0300)
committerHajime Hoshi <hajimehoshi@gmail.com>
Fri, 9 Oct 2020 09:55:58 +0000 (09:55 +0000)
commit33511fb959f8f0edd5e831a4b41523daf9d84e87
treec6a2ce9b43919d49b4ff95738bc5ecfa0e1085c7
parent2be7788f8383c2330cd96db53273e2995d4468f8
net/http/pprof: remove html/template dependency

html/template indirectly uses reflect MethodByName, this causes linker
to use conservative mode resulting in larger binaries. The template here
is trivial and can be replaced by string manipulation.

This reduces a binary using only net/http/pprof by ~2.5MB.

Fixes #41569

Change-Id: I240e1daa6376182ff4961997ee3ec7b96cb07be8
Reviewed-on: https://go-review.googlesource.com/c/go/+/256900
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
src/go/build/deps_test.go
src/net/http/pprof/pprof.go