load.loadPackageData was only using an index for modules, not for standard library packages. Other parts of the code were using the index, so there was some benefit, but not as much as you'd hope. With the index disabled, the Script/work test takes 2.2s on my Mac. With the index enabled before this CL, it took 2.0s. With the index enabled after this CL, it takes 1.6s. Before this CL, the Script/work test issued: 429 IsDir 19 IsDirWithGoFiles 7 Lstat 9072 Open 993 ReadDir 256 Stat 7 Walk 3 indexModule 24 openIndexModule 525 openIndexPackage After this CL, it issued: 19 IsDirWithGoFiles 7 Lstat 60 Open 606 ReadDir 256 Stat 7 Walk 3 indexModule 24 openIndexModule 525 openIndexPackage This speedup helps the Dragonfly builder, which has very slow file I/O and is timing out since a recent indexing change. Times for go test -run=Script/^work$ on the Dragonfly builder: 50s before indexing changes 31s full module indexing of std 46s per-package indexing of std It cuts the time for go test -run=Script/^work$ from 44s to 20s. For #53577. Change-Id: I7189a77fc7fdf61de3ab3447efc4e84d1fc52c25 Reviewed-on: https://go-review.googlesource.com/c/go/+/416134 Reviewed-by: Bryan Mills <bcmills@google.com> |
||
|---|---|---|
| .github | ||
| api | ||
| doc | ||
| lib/time | ||
| misc | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| SECURITY.md | ||
| codereview.cfg | ||
README.md
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.