From 86c10ca3806fcc2df1bc5030bc38393ace3ddd92 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Fri, 9 Sep 2022 00:40:11 +0200 Subject: [PATCH] perf: reduce memory usage by reducing amt of position's created The positions created were taking GB's of memory and were not being GC'ed. --- pkg/position/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/position/pool.go b/pkg/position/pool.go index ad26891..1a96ea1 100644 --- a/pkg/position/pool.go +++ b/pkg/position/pool.go @@ -1,6 +1,6 @@ package position -const DefaultBlockSize = 1024 +const DefaultBlockSize = 50 type Pool struct { block []Position