Skip to content

Commit 61b7689

Browse files
committed
Remove debug
1 parent 7e17990 commit 61b7689

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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()

src/virtual.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)