Skip to content

Commit b9a145a

Browse files
committed
update selectRangeStrategy for better performance
1 parent 7478a38 commit b9a145a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/get/config/default/selectRangeStrategy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
type RangeIndex = number
22

3-
const threshold = 10
3+
// const threshold = 10
44

55
export function defaultSelectRangeStrategy (
66
downloaderCounter: Map<RangeIndex, number>
77
): RangeIndex {
88
const minRangeIndex = getMapMinOrZero(downloaderCounter)
9-
const firstIndex = downloaderCounter.keys().next().value as number
9+
// const firstIndex = downloaderCounter.keys().next().value as number
1010

11-
if (minRangeIndex - firstIndex > threshold) {
12-
return firstIndex
13-
}
11+
// if (minRangeIndex - firstIndex > threshold) {
12+
// return firstIndex
13+
// }
1414

1515
return minRangeIndex
1616
}

0 commit comments

Comments
 (0)