mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Preallocate slice for skipped nodes
This commit is contained in:
@@ -21,6 +21,7 @@ func NewLimitIterator(ctx Context, source RankIterator, limit int, scoreThreshol
|
||||
limit: limit,
|
||||
maxSkip: maxSkip,
|
||||
scoreThreshold: scoreThreshold,
|
||||
skippedNodes: make([]*RankedNode, 0, limit+maxSkip),
|
||||
}
|
||||
return iter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user