mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
reduce 1.5x memory usage on large repos on repeated runs (#764)
Get rid of AST cache: load AST when needed. Optimize memory allocations for go/analysis actions. Relates: #337
This commit is contained in:
parent
ea417ffa0b
commit
df4f6766ba
15 changed files with 265 additions and 348 deletions
|
@ -290,8 +290,8 @@ func (e *Executor) runAnalysis(ctx context.Context, args []string) ([]result.Iss
|
|||
}
|
||||
lintCtx.Log = e.log.Child("linters context")
|
||||
|
||||
runner, err := lint.NewRunner(lintCtx.ASTCache, e.cfg, e.log.Child("runner"),
|
||||
e.goenv, e.lineCache, e.DBManager)
|
||||
runner, err := lint.NewRunner(e.cfg, e.log.Child("runner"),
|
||||
e.goenv, e.lineCache, e.DBManager, lintCtx.Packages)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue