File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const VirtualList = Vue.component(NAME, {
51
51
} , this . onRangeChanged )
52
52
53
53
// just for debug
54
- window . virtual = this . virtual
54
+ // window.virtual = this.virtual
55
55
56
56
// also need sync initial range first.
57
57
this . range = this . virtual . getRange ( )
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ export default class Virtual {
42
42
}
43
43
44
44
// benchmark test data.
45
- this . __bsearchCalls = 0
46
- this . __getIndexOffsetCalls = 0
45
+ // this.__bsearchCalls = 0
46
+ // this.__getIndexOffsetCalls = 0
47
47
}
48
48
49
49
destroy ( ) {
@@ -185,11 +185,10 @@ export default class Virtual {
185
185
let high = this . param . uniqueIds . length
186
186
187
187
while ( low <= high ) {
188
+ // this.__bsearchCalls++
188
189
middle = low + Math . floor ( ( high - low ) / 2 )
189
190
middleOffset = this . getIndexOffset ( middle )
190
191
191
- this . __bsearchCalls ++
192
-
193
192
if ( middleOffset === offset ) {
194
193
return middle
195
194
} else if ( middleOffset < offset ) {
@@ -213,7 +212,7 @@ export default class Virtual {
213
212
let offset = 0
214
213
let indexSize = 0
215
214
for ( let index = 0 ; index <= givenIndex ; index ++ ) {
216
- this . __getIndexOffsetCalls ++
215
+ // this.__getIndexOffsetCalls++
217
216
indexSize = this . sizes . get ( this . param . uniqueIds [ index ] )
218
217
offset = offset + ( indexSize || this . getEstimateSize ( ) )
219
218
}
You can’t perform that action at this time.
0 commit comments