You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Add -editor=true flag & invoke FreeOSMemory periodically (lower memory consumption)
To try this change out:
1. `git checkout sg/mem` to the exact commit.
2. `go install github.com/sourcegraph/go-langserver`
3. Open some Go code and hover over a symbol, then make an edit, then hover, repeat... (each edit and hover triggers type-checking again).
4. For now, you can also set `"go.languageServerFlags": ["-editor=false"]` in VS Code settings to try without this change (to compare memory usage).
With `code github.com/docker/docker/cmd/dockerd/docker.go`, and making 10 edits/hovers, the change is:
| Real Before | Real After | Real Change | Go Before | Go After | Go Change |
|-------------|------------|-------------|-----------|----------|-----------|
| 7.61GB | 4.12GB | -45.86% | 3.92GB | 3.33GB | -15.05% |
Where `Real` means real memory reported by OS X Activity Monitor, and `Go` means memory reported by Go as being in use.
TL;DR: 46% less memory consumption for users running with the vscode-go extension.
0 commit comments