Skip to content

Commit

Permalink
html: lazily populate Unescape tables
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Emmanuel Odeke <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
bradfitz committed Jul 31, 2018
1 parent 04c0958 commit 740e589
Show file tree
Hide file tree
Showing 3 changed files with 2,256 additions and 2,235 deletions.
Loading

0 comments on commit 740e589

Please sign in to comment.