Tab Search - Fix scroll jank/latency.
Relevant pinpoint benchmark results:
https://pinpoint-dot-chromeperf.appspot.com/job/12d352aad20000
https://pinpoint-dot-chromeperf.appspot.com/job/1011ee42d20000
https://pinpoint-dot-chromeperf.appspot.com/job/11aa1592d20000
Bug: 1149400
Change-Id: Ibe3afd85eaeaa8b6f13902c282cc3f5bb45ca3e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2623159
Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Yuheng Huang <yuhengh@chromium.org>
Commit-Queue: Roman Arora <romanarora@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843297}
diff --git a/chrome/browser/resources/tab_search/infinite_list.js b/chrome/browser/resources/tab_search/infinite_list.js
index d6f6edb0..62cc2c2 100644
--- a/chrome/browser/resources/tab_search/infinite_list.js
+++ b/chrome/browser/resources/tab_search/infinite_list.js
@@ -50,15 +50,6 @@
value: 10,
},
- /**
- * Controls the number of scrolled items in the currently fetched item
- * chunk after which a new chunk of items should be added on demand.
- */
- chunkItemThreshold: {
- type: Number,
- value: 5,
- },
-
/** @type {?Array<!Object>} */
items: {
type: Array,
@@ -153,7 +144,7 @@
// Ensure we have sufficient items to fill the current scroll position and
// a full view following our current position.
- if (aboveScrollTopItemCount + this.chunkItemThreshold >
+ if (aboveScrollTopItemCount + this.chunkItemCount >
this.domRepeat_.items.length) {
this.ensureDomItemsAvailableStartingAt_(aboveScrollTopItemCount);
this.updateScrollerSize_();