From 11bbc98bdf267701ba6c98f1fd6cc318b91703ef Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Wed, 9 Aug 2023 21:02:50 +0530 Subject: [PATCH] free mem --- src/corso.go | 4 ++-- src/internal/m365/collection/drive/collection.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corso.go b/src/corso.go index bc1eacdc0..f14f11ece 100644 --- a/src/corso.go +++ b/src/corso.go @@ -14,8 +14,8 @@ import ( "github.com/pkg/profile" ) -var profileTicker = time.NewTicker(600 * time.Second) -var printTicker = time.NewTicker(60 * time.Second) +var profileTicker = time.NewTicker(300 * time.Second) +var printTicker = time.NewTicker(10 * time.Second) var profileCounter = 0 func main() { diff --git a/src/internal/m365/collection/drive/collection.go b/src/internal/m365/collection/drive/collection.go index 4d3a06063..fd9620fb3 100644 --- a/src/internal/m365/collection/drive/collection.go +++ b/src/internal/m365/collection/drive/collection.go @@ -468,7 +468,7 @@ func (oc *Collection) populateItems(ctx context.Context, errs *fault.Bus) { wg.Wait() // free up memory - oc.driveItems = nil + oc.driveItems = make(map[string]models.DriveItemable) oc.reportAsCompleted(ctx, int(stats.itemsFound), int(stats.itemsRead), stats.byteCount) }