go/analysis: document that facts are gob encoded in one gulp

Fixes golang/go#54661

Change-Id: Iddae4d2ab54fc0527e060922351c52eec07c78c0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/454564
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Alan Donovan <adonovan@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
diff --git a/go/analysis/doc.go b/go/analysis/doc.go
index b5a301c..c5429c9 100644
--- a/go/analysis/doc.go
+++ b/go/analysis/doc.go
@@ -244,6 +244,9 @@
 Because serialized facts may appear within build outputs, the gob encoding
 of a fact must be deterministic, to avoid spurious cache misses in
 build systems that use content-addressable caches.
+The driver makes a single call to the gob encoder for all facts
+exported by a given analysis pass, so that the topology of
+shared data structures referenced by multiple facts is preserved.
 
 The Pass type has functions to import and export facts,
 associated either with an object or with a package: