$ the-wire · showcase
Go test cache hits get 100x faster, as three net/http and mime parser changes land
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
Damien Neil's batch of URL and MIME parsing fixes closes several parser differentials in net/http, mime, and net/http/cgi, while cmd/go reworks what it stores from test logs and the build images pick up podman.
cmd/go: store only the test log entries that the inputs ID uses golang/go
cmd/go now stores only the test log entries that computeTestInputsID actually uses, so a cache hit no longer re-checks entries outside the module, GOPATH, or GOROOT roots. On the 1,000,000 os.Stat benchmark on darwin/arm64, cached runs dropped from 10.7s to 0.09s (median of 5), against 5.0s uncached.
mime: don't *-decode multipart/*, boundary, or charset in ParseMediaType golang/go
ParseMediaType no longer *-decodes parameters in multipart/*, in any parameter named boundary, or in charset, closing parser differentials between Go and other MIME parsers. If you were relying on RFC 2231 encoding in those positions, the decoded value is no longer what you get.
net/http: always use target Host on scheme-relative redirects golang/go
Client used to preserve the original request's host when following a scheme-relative redirect like "//example/com/" if Request.Host differed from Request.URL; it now always uses the target Host. A relative Location of "//example.tld/path" in net/http/cgi likewise becomes a protocol-relative non-local redirect rather than a local one parsed with a hostname.
internal/postgres: disable popularSearch golang/pkgsite
pkgsite stopped hedging its search between popularSearch and deepSearch: metrics showed deepSearch wins the race for roughly 99.5% of queries. Popular-term searches still take 1 to 3 seconds when they miss the Redis cache, but that path is now the only one.
internal/vulndbreqs: reduce mutex contention golang/pkgsite-metrics
Background: vulndbreqs goroutines now fill a local map before taking the lock and touching global state, instead of locking on every observed log entry, and IP obfuscation was moved after de-duplication so dedup keys stay on raw addresses until the work is done.