-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/tools/gopls: gopls falls behind user input in large repository #45089
Comments
Thank you so much for this detailed report, @denbeigh2000. We did discover a bug that caused a performance issue in v0.6.7, and it should now be addressed at master. Can you please test this out once again with the latest master and confirm whether there is still a problem? You can download |
Howdy @stamblerre! I repeated these steps this morning, and I see an improvement in autocomplete:
However, I do still see some issues in latency/saving:
Steps I took:
This is the version I have been testing with:
And here are output logs of two runs: Run 2: open file, add line, immediate save, wait for code actions on save prompt NB: Due to some logistical changes, @aws5295 and/or @kushmansingh will be carrying on this discussion - I've ensured that these reproducible troubleshooting steps have been communicated. Thank you for your attentiveness toward our gopls inquiries! 🙏 |
Thank you so much for sharing this information. It looks like you're working in a really big monorepo, and |
There hasn't been any activity on this issue for a few months, so going to close it. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
gopls
enabled.What did you expect to see?
gopls
should provide feedback that updates promptly as I typecodeActionsOnSaveTimeout
option.What did you see instead?
gopls
appears to take several seconds to process each keystroke, and I need to wait to allowgopls
to catch up. I see feedback gradually appear character-by-character, and autocomplete shown only after this has caught up to the new state of the file.If I save before gopls has caught up, I see a "Waiting for code actions from "Go"" prompt, that I can only dismiss by hard-quitting VSCode, or waiting for gopls to finish its' work (in these experiments, this took 40-60s). If I save after gopls has caught up, the action is relatively quick.
Build info
Tested with two versions - v0.6.7 and a recent master
gopls bug
Output (0.6.7)gopls bug
Output (recent master)Log files/debugging info
VSCode settings
go.code-workspace
Test 1: gopls@6d45e3d999c1 opened file, add statement, wait for gopls to catch up, save file
gopls-log.sanitised.out.txt-1
Test 2: gopls@6d45e3d999c1 opened file, add statement, save immediately
gopls-log.sanitised.out.txt
Test 3: [email protected] opened file, add statement, wait for gopls to catch up, save file
gopls-log.sanitised.out.txt
Let me know if I can provide any more info! I have also collected memory/cpu profiles and traces, but they exceed GH's file posting limit - happy to share these on Gophers Slack or similar.
The text was updated successfully, but these errors were encountered: