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, {
5151 } , this . onRangeChanged )
5252
5353 // just for debug
54- window . virtual = this . virtual
54+ // window.virtual = this.virtual
5555
5656 // also need sync initial range first.
5757 this . range = this . virtual . getRange ( )
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ export default class Virtual {
4242 }
4343
4444 // benchmark test data.
45- this . __bsearchCalls = 0
46- this . __getIndexOffsetCalls = 0
45+ // this.__bsearchCalls = 0
46+ // this.__getIndexOffsetCalls = 0
4747 }
4848
4949 destroy ( ) {
@@ -185,11 +185,10 @@ export default class Virtual {
185185 let high = this . param . uniqueIds . length
186186
187187 while ( low <= high ) {
188+ // this.__bsearchCalls++
188189 middle = low + Math . floor ( ( high - low ) / 2 )
189190 middleOffset = this . getIndexOffset ( middle )
190191
191- this . __bsearchCalls ++
192-
193192 if ( middleOffset === offset ) {
194193 return middle
195194 } else if ( middleOffset < offset ) {
@@ -213,7 +212,7 @@ export default class Virtual {
213212 let offset = 0
214213 let indexSize = 0
215214 for ( let index = 0 ; index <= givenIndex ; index ++ ) {
216- this . __getIndexOffsetCalls ++
215+ // this.__getIndexOffsetCalls++
217216 indexSize = this . sizes . get ( this . param . uniqueIds [ index ] )
218217 offset = offset + ( indexSize || this . getEstimateSize ( ) )
219218 }
You can’t perform that action at this time.
0 commit comments