Skip to content

Commit 4659b07

Browse files
authored
Add comment explaining why we limit concurrency
1 parent 557f50a commit 4659b07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/exec/exec.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ func (r *Request) execList(ctx context.Context, sels []selected.Selection, typ *
313313
entryouts := make([]bytes.Buffer, l)
314314

315315
if selected.HasAsyncSel(sels) {
316+
// Limit the number of concurrent goroutines spawned as it can lead to large
317+
// memory spikes for large lists.
316318
concurrency := cap(r.Limiter)
317319
sem := make(chan struct{}, concurrency)
318320
for i := 0; i < l; i++ {

0 commit comments

Comments
 (0)