From 71a83b7f9d73a90664b343c99001516f5411a0bb Mon Sep 17 00:00:00 2001 From: Daniel Morsing Date: Tue, 25 Aug 2015 14:51:17 -0600 Subject: [PATCH] Remove unused buffer allocation The buffer allocation in bz1 was unused and I'm fairly certain that it was harmful to performance if used. For queries that run through a bz1 block, needing to hold on to a 64kb block is expensive. Better to churn on the allocator and have the blocks be released when they are unused than to have 64kb hanging around for each series regardless of size. Thanks to @jwilder for brainstorming this issue with me. --- tsdb/engine/bz1/bz1.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tsdb/engine/bz1/bz1.go b/tsdb/engine/bz1/bz1.go index 47fa51034d..5ab1483c73 100644 --- a/tsdb/engine/bz1/bz1.go +++ b/tsdb/engine/bz1/bz1.go @@ -598,7 +598,6 @@ func (tx *Tx) Cursor(key string) tsdb.Cursor { c := &Cursor{ cursor: b.Cursor(), - buf: make([]byte, DefaultBlockSize), } return tsdb.MultiCursor(walCursor, c)