Skip to content

Commit

Permalink
opt: pre-allocate chunk blocks slice in chunk proposer
Browse files Browse the repository at this point in the history
  • Loading branch information
qcrao committed Dec 11, 2024
1 parent 06beb5d commit 25f741f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rollup/internal/controller/watcher/chunk_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ func (p *ChunkProposer) proposeChunk() error {
}

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

Expand Down

0 comments on commit 25f741f

Please sign in to comment.