Skip to content

Drop memory usage of go/analysis linters 5x #725

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

Merged
merged 1 commit into from
Sep 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pkg/golinters/goanalysis/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,13 @@ func (lp *loadingPackage) decUse() {
pass.ImportPackageFact = nil
pass.ExportPackageFact = nil
act.pass = nil
act.deps = nil
if act.result != nil {
if isMemoryDebug {
debugf("%s: decUse: nilling act result of size %d bytes", act, sizeOfValueTreeBytes(act.result))
}
act.result = nil
}
}

lp.pkg.Syntax = nil
Expand Down Expand Up @@ -899,13 +906,6 @@ func (lp *loadingPackage) decUse() {
}
act.packageFacts = nil
act.objectFacts = nil
act.deps = nil
if act.result != nil {
if isMemoryDebug {
debugf("%s: decUse: nilling act result of size %d bytes", act, sizeOfValueTreeBytes(act.result))
}
act.result = nil
}
}
lp.actions = nil
}
Expand Down