From c095e92c406968a5aefe57ce97e3c4097ad91b9a Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Mon, 1 May 2017 08:06:48 -0700 Subject: [PATCH] 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 --- src/cmd/compile/internal/gc/bexport.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 { -- 2.51.0