go/src/html
Brad Fitzpatrick 740e589bd0 html: lazily populate Unescape tables
Saves ~105KB of heap for callers who don't use html.UnescapeString.
(EscapeString is much more common).

Also saves 70KB of binary size, because now the linker can do dead
code elimination. (because #2559 is still open and global maps always
generate init code)

Fixes #26727
Updates #6853

Change-Id: I18fe9a273097e2c7e0cb7f88205cae1bb60fa89b
Reviewed-on: https://go-review.googlesource.com/127075
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-07-31 22:10:54 +00:00
..
template html/template: ignore untyped nil arguments to default escapers 2018-07-09 21:54:35 +00:00
entity.go html: lazily populate Unescape tables 2018-07-31 22:10:54 +00:00
entity_test.go html: lazily populate Unescape tables 2018-07-31 22:10:54 +00:00
escape.go html: lazily populate Unescape tables 2018-07-31 22:10:54 +00:00
escape_test.go
example_test.go