Skip to content

Commit 563f1b5

Browse files
committed
opt: pre-allocate chunk blocks slice in chunk proposer
1 parent 06beb5d commit 563f1b5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

common/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime/debug"
66
)
77

8-
var tag = "v4.4.81"
8+
var tag = "v4.4.82"
99

1010
var commit = func() string {
1111
if info, ok := debug.ReadBuildInfo(); ok {

rollup/internal/controller/watcher/chunk_proposer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ func (p *ChunkProposer) proposeChunk() error {
295295
}
296296

297297
var chunk encoding.Chunk
298+
chunk.Blocks = make([]*encoding.Block, 0, len(blocks))
298299
for i, block := range blocks {
299300
chunk.Blocks = append(chunk.Blocks, block)
300301

0 commit comments

Comments
 (0)