Commit fe7d27a5 authored by Tom Lukaszewicz's avatar Tom Lukaszewicz Committed by Josip Sokcevic

Tab Search: Disable dom-repeat chunking after initial render.

Dom-repeat chunking used for the first render of the Tab Search UI
to eliminate the need to render the full list before showing the UI
to the user.

This bounds the time to interactive for users with an arbitrary
number of open tabs.

This CL disables chunking after first load due to flickering when
the tab list updates later on.

Bug: 1099917
Change-Id: I2924756230ef50aea8d0623c0f2a2637623b9b22
Reviewed-on: https://chrome-internal-review.googlesource.com/c/chrome/browser/resources/tab_search/+/3288859Reviewed-by: default avatarYuheng Huang <yuhengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819615}
parent 7cfe6840
...@@ -61,7 +61,6 @@ export class TabSearchAppElement extends PolymerElement { ...@@ -61,7 +61,6 @@ export class TabSearchAppElement extends PolymerElement {
*/ */
chunkingItemCount_: { chunkingItemCount_: {
type: Number, type: Number,
readOnly: true,
value: 10, value: 10,
}, },
...@@ -161,6 +160,13 @@ export class TabSearchAppElement extends PolymerElement { ...@@ -161,6 +160,13 @@ 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