Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: slow to download std when running locally #60114

Open
adonovan opened this issue May 10, 2023 · 2 comments
Open

x/pkgsite: slow to download std when running locally #60114

adonovan opened this issue May 10, 2023 · 2 comments
Labels
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented May 10, 2023

Steps to reproduce:

  • $ go run golang.org/x/pkgsite/cmd/pkgsite@master &
  • $ open http://localhost:8080
  • Enter "fmt", hit Return, see search results page.
  • Click first link for package fmt
  • Wait 17s for download of std@latest.
  • See documentation for fmt.

Ideally we would eliminate step 5. Is it necessary to select std@latest when there's a recent version of std already already installed?

Perhaps std@installedversion could also be offered on the "Or browse local modules:" menu, since just as it is desirable for the docs to reflect the local edits to modules, so too it is desirable to show the version of Go that is installed locally.

Loosely related:

@gopherbot gopherbot added this to the Unreleased milestone May 10, 2023
@adonovan adonovan changed the title x/pkgsite: slow to download std x/pkgsite: slow to download std when running locally May 10, 2023
@seankhliao
Copy link
Member

seankhliao commented May 10, 2023

There's the -gorepo flag for use with a checkout of the go repo
Though i still don't know how to get pkgsite to show "contents of my current CL" for std

related #57742

@adonovan
Copy link
Member Author

adonovan commented Jun 4, 2023

There's the -gorepo flag for use with a checkout of the go repo

Thanks. I tried it twice, once with -gorepo=$(dirname $(dirname $(go list -f {{.Dir}} fmt))) to be consistent with the installed go command on the $PATH, and once with -goroot=$HOME/w/goroot which is a git client. In neither case did it reduce the latency of loading std. I haven't dug in to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants