Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: store package metadata in build cache #31417
The Go command currently spends a lot of time gathering package metadata using
We should investigate saving the package metadata we gather in the build cache. The cache key for a package would be derived from
We should take care to avoid hazards with mtime comparison. In particular, we should avoid caching stat data that is only a few seconds old because some file systems have low time resolution, and there is a window where several changes can be made without changing the recorded mtime. We may want to enable this only on certain file systems, operating systems, or only for the module cache.
An initial prototype (CL 75295) shows we can reduce