Skip to content

Commit 25f741f

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

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)