Reset grokky once all patterns are compiled as we do not need to hold them in memoory (#2420)
This commit is contained in:
parent
a6b55f2b5e
commit
ff7acd3347
1 changed files with 7 additions and 1 deletions
|
@ -148,6 +148,12 @@ func LoadParsers(cConfig *csconfig.Config, parsers *Parsers) (*Parsers, error) {
|
|||
parsers.Ctx.Profiling = true
|
||||
parsers.Povfwctx.Profiling = true
|
||||
}
|
||||
|
||||
/*
|
||||
Reset CTX grok to reduce memory footprint after we compile all the patterns
|
||||
*/
|
||||
parsers.Ctx.Grok = grokky.Host{}
|
||||
parsers.Povfwctx.Grok = grokky.Host{}
|
||||
parsers.StageFiles = []Stagefile{}
|
||||
parsers.PovfwStageFiles = []Stagefile{}
|
||||
return parsers, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue