-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
go: determine cause(s) of Go plugin performance issues #12719
Comments
It would be neat to have metrics for how expensive chroot setup is in general. |
Looking into it. I want a work-unit for sandbox setup activities. |
#12721 adds a workunit to capture input root materialization time. |
I did a build of Go code in remote-api-tools with an empty cache and captured a trace: https://drive.google.com/file/d/1sV7WMuO1UikQ_byzoZG40_XoR9h7K80Q/view?usp=sharing Materializing the input root is taking an inordinate amount of time. For example, for a |
71% and 61% of the time is a lot, but still leaves a lot of other time unaccounted for... if I did things correctly, a clean build of that binary directly using It looks like the pants/src/python/pants/backend/python/util_rules/pex_environment.py Lines 129 to 134 in ae647d1
pex_root , and asks for a symlink at .cache/pex_root ).
|
I believe the other time is accounted for by The GOCACHE should not be of much value since we store the package archives in the CAS. The plugin invokes |
I'm a bit confused: is the GOCACHE different from the "go module cache" that you mention in that first comment? |
Yes. GOCACHE is the "build cache" for built artifacts (i.e., object files, package archives, etc.), while the "module cache" is the downloaded copies of third-party modules generally stored in the GOPATH (and not the GOCACHE). |
When building
casload
in https://github.com/toolchainlabs/remote-api-tools, a run of./pants package cmd/casload:bin
with an empty cache takes ~11 minutes.Theories for the performance issue:
go list ./...
to ascertain the packages within a module. I verified that downloads do occur by deleting my Go module cache and runninggo list -x ./...
which displayed all of the download commands.Process
invoking thego
tool takes lots of time in aggregate. Needs to be confirmed (maybe via adding a work-unit).The text was updated successfully, but these errors were encountered: