diff options
author | Daniel Milde <daniel@milde.cz> | 2022-01-17 21:57:04 +0100 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2022-01-17 21:57:04 +0100 |
commit | f33f5911ec46c991c08f4d40232663d9ba29c414 (patch) | |
tree | 62205d4bed50f25cc7bdc52979008beeb8084348 /stdout | |
parent | eacaedb4f843a8d629f1f7572f8600c3fbf5c20a (diff) |
refactor: enabling/disabling GC moved to analyzer
Diffstat (limited to 'stdout')
-rw-r--r-- | stdout/stdout.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/stdout/stdout.go b/stdout/stdout.go index 4e6b4af..88995b1 100644 --- a/stdout/stdout.go +++ b/stdout/stdout.go @@ -5,7 +5,6 @@ import ( "io" "math" "runtime" - "runtime/debug" "sort" "sync" "time" @@ -145,10 +144,7 @@ func (ui *UI) AnalyzePath(path string, _ fs.Item) error { wait.Add(1) go func() { defer wait.Done() - if !ui.EnableGC { - defer debug.SetGCPercent(debug.SetGCPercent(-1)) - } - dir = ui.Analyzer.AnalyzeDir(path, ui.CreateIgnoreFunc()) + dir = ui.Analyzer.AnalyzeDir(path, ui.CreateIgnoreFunc(), ui.EnableGC) dir.UpdateStats(make(fs.HardLinkedItems, 10)) }() |