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

Go backend impacts all rules & incurs meaningful slowdowns #20340

Open
kuza55 opened this issue Dec 27, 2023 · 4 comments
Open

Go backend impacts all rules & incurs meaningful slowdowns #20340

kuza55 opened this issue Dec 27, 2023 · 4 comments
Labels
backend: Go Go backend-related issues bug

Comments

@kuza55
Copy link

kuza55 commented Dec 27, 2023

Describe the bug
The go backend seems to not have any caching of import information, i.e. no concept of lockfiles, and additionally seems to need to figure out the imports for go targets, even when they are not being referenced in a rule.

Additionally, adding any go rules necessitates the installation of a go compiler when doing anything with pants.

The most noticeable issue with this is that every time pants starts, it spends ~30 seconds downloading imports for the small go program we have. Presumably this slowdown will increase as the size of our go codebase increases.

Pants version
2.17.0

OS
Linux

@kuza55 kuza55 added the bug label Dec 27, 2023
@benjyw
Copy link
Sponsor Contributor

benjyw commented Dec 27, 2023

Oof, sorry for the trouble. The Go backend is still experimental and needs some love. I have been looking at one related issue (#20274) but won't get to it until the new year. I did notice that Pants appears to do a lot of download-related work every time pantsd restarts, I'm not yet sure if it's actually downloading or just spending a lot of time scheduling download processes that are then resolved from cache. This all needs some triage.

@huonw huonw added the backend: Go Go backend-related issues label Jan 13, 2024
@cjim8889
Copy link

+1, go-related stuffs still show up even when I am building a pure python pacakge.

@gniemann
Copy link
Contributor

gniemann commented May 6, 2024

+1. We are in a mostly Python repo where we wanted to add Go. We found this issue so impactful that we were forced to disable the Go backend and are looking for other ways to use Go within the repo.

@benjyw
Copy link
Sponsor Contributor

benjyw commented May 7, 2024

Sorry for the bad experience. The Go backend really needs some attention and investment, ideally by an interested party. As an open-source project anyone is welcome to chip in! Also, if this is important to your engineering organization, there are folks who can do this kind of work on contract. Feel free to reach out to me on Slack and I can help find such a person.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues bug
Projects
None yet
Development

No branches or pull requests

5 participants