From: Josh Bleecher Snyder Date: Mon, 1 May 2017 15:06:48 +0000 (-0700) Subject: cmd/compile: add comments to trackAllTypes X-Git-Tag: go1.9beta1~368 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c095e92c406968a5aefe57ce97e3c4097ad91b9a;p=gostls13.git cmd/compile: add comments to trackAllTypes 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 --- diff --git a/src/cmd/compile/internal/gc/bexport.go b/src/cmd/compile/internal/gc/bexport.go index 26c8bc9a9d..0c19ad9ed6 100644 --- a/src/cmd/compile/internal/gc/bexport.go +++ b/src/cmd/compile/internal/gc/bexport.go @@ -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 {