]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add comments to trackAllTypes
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 1 May 2017 15:06:48 +0000 (08:06 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 1 May 2017 15:22:20 +0000 (15:22 +0000)
Per gri's suggestion on CL 41623,
add a comment to trackAllTypes
about the trade-offs of enabling it.

Change-Id: Iec42b0da7933543200729003d1b2c6e0d9dcc5f0
Reviewed-on: https://go-review.googlesource.com/42186
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/bexport.go

index 26c8bc9a9d32917b813d493ce9782da40cdbb295..0c19ad9ed65668d5a49422fb150b6ca9e80f8441 100644 (file)
@@ -158,7 +158,10 @@ const exportInlined = true // default: true
 // less efficient encoding in rare cases. It also prevents the export of
 // some corner-case type declarations (but those were not handled correctly
 // with the former textual export format either).
-// TODO(gri) enable and remove once issues caused by it are fixed
+// Note that when a type is only seen once, as many unnamed types are,
+// it is less efficient to track it, since we then also record an index for it.
+// See CLs 41622 and 41623 for some data and discussion.
+// TODO(gri) enable selectively and remove once issues caused by it are fixed
 const trackAllTypes = false
 
 type exporter struct {