Commit 15fc9926 authored by Yuheng Huang's avatar Yuheng Huang Committed by Josip Sokcevic

chunkingItemCount_ = 0 should be called when chunking is started, instead of...

chunkingItemCount_ = 0 should be called when chunking is started, instead of waiting for the second getProfileTabs calls() because getProfileTabs() can be called only once.

Bug: 1099917
Change-Id: Id3d0ee0c29220ccee66b8c3ffaff40db42d03f80
Reviewed-on: https://chrome-internal-review.googlesource.com/c/chrome/browser/resources/tab_search/+/3295842Reviewed-by: default avatarTom Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819618}
parent bc5381a1
...@@ -151,6 +151,13 @@ export class TabSearchAppElement extends PolymerElement { ...@@ -151,6 +151,13 @@ export class TabSearchAppElement extends PolymerElement {
// The initial rendered tab list must be non-zero. // The initial rendered tab list must be non-zero.
assert(event.detail.value > 0); assert(event.detail.value > 0);
// Chunking is used to bound the time to interactive for users
// irrespective of the number of tabs they have open. This is no longer
// needed after the initial list render and can cause flickering on
// updates so disable it here.
// TODO(tluk): Investigate a more efficient way to handle this.
this.chunkingItemCount_ = 0;
// Push showUI() to the event loop to allow reflow to occur following // Push showUI() to the event loop to allow reflow to occur following
// the DOM update. // the DOM update.
setTimeout(() => { setTimeout(() => {
...@@ -160,13 +167,6 @@ export class TabSearchAppElement extends PolymerElement { ...@@ -160,13 +167,6 @@ export class TabSearchAppElement extends PolymerElement {
Math.round(window.performance.now())); Math.round(window.performance.now()));
}, 0); }, 0);
}); });
} else {
// Chunking is used to bound the time to interactive for users
// irrespective of the number of tabs they have open. This is no longer
// needed after the initial list render and can cause flickering on
// updates so disable it here.
// TODO(tluk): Investigate a more efficient way to handle this.
this.chunkingItemCount_ = 0;
} }
this.openTabs_ = profileTabs.windows; this.openTabs_ = profileTabs.windows;
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment