Skip to content

Commit

Permalink
Added GC runs between each stage of loading and processing
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Dec 19, 2024
1 parent a37809d commit 3ef21ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/engine/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func Run(paths ...string) (*Objects, error) {
}
preprocessWG.Wait()

runtime.GC()
overallprogress.Add(1)

// Merging
Expand All @@ -95,10 +96,12 @@ func Run(paths ...string) (*Objects, error) {
}
ao, err := Merge(objs)

runtime.GC()
overallprogress.Add(1)

for priority := AfterMergeLow; priority <= AfterMergeFinal; priority++ {
PostProcess(ao, priority)
runtime.GC()
overallprogress.Add(1)
}

Expand Down

0 comments on commit 3ef21ac

Please sign in to comment.