-
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: reduce memory usage #36943
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Change https://golang.org/cl/236397 mentions this issue: |
When you write a test in (say) the fmt package, you get a test variant augmented with the test files. In many cases you also get test variants of the things the fmt package depends on. The primary test variant, (fmt [fmt.test]) is interesting to us, because it contains the tests. But the intermediate variants (testing [fmt.test]) aren't -- the user can only get to them indirectly. We certainly don't need to fully parse them. Treat intermediate test variants as non-workspace packages. This doesn't accomplish much yet but paves the way for later optimizations. Updates golang/go#36943. Change-Id: I1a20abcd2d67767f07132a75a20f098be6f19a76 Reviewed-on: https://go-review.googlesource.com/c/tools/+/236397 Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
I think the commits I pushed today have improved things significantly for large projects. I'll keep looking for a little bit. |
This comment has been minimized.
This comment has been minimized.
From the first comment: If you have a specific problem with gopls using too much memory on your machine, please create a new issue so that we can investigate it separately. There will be zip files in /tmp with additional memory diagnostic information. Please include one of them. If you are uncomfortable sharing the package names of your code you can pick one with a |
There have been a number of memory improvements in |
@stamblerre just switched to master and it dropped my ram usage from 10 gigs to 1.5gb! Great work guys! |
Change https://golang.org/cl/253577 mentions this issue: |
This is a general tracking issue for memory usage in
gopls
. We need to collect data and set goals for usage for a given project size. We also need to work towards reducing the memory usage when staticcheck is enabled (though that may be a separate issue).If you have a specific problem with
gopls
using too much memory on your machine, please create a new issue so that we can investigate it separately.Please include your editor settings and memory debug information with your issue. These are automatically written to the temporary directory (
/tmp
for Unixes) with names likegopls.1234-5GiB-withnames.zip
. If you are uncomfortable sharing the package names of your code, you can share the-nonames
zip instead.The text was updated successfully, but these errors were encountered: