Skip to content

Commit 4abb909

Browse files
committed
fix performance
1 parent a3e887b commit 4abb909

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/logrepl/cdc.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ func (i *CDCIterator) NextN(ctx context.Context, n int) ([]opencdc.Record, error
124124
return nil, fmt.Errorf("n must be greater than 0, got %d", n)
125125
}
126126

127-
recs := make([]opencdc.Record, 0, n)
127+
// 40K msg/s
128+
//recs := make([]opencdc.Record, 0, n)
129+
130+
// 150K msg/s
131+
var recs []opencdc.Record
128132

129133
// Block until at least one record is received or context is canceled
130134
select {

0 commit comments

Comments
 (0)