Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Issue 2230003002: MD History: Add lazy-render element for simple lazy initialization. (Closed)

Created:
4 years, 4 months ago by tsergeant
Modified:
4 years, 4 months ago
Reviewers:
calamity
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, arv+watch_chromium.org, Patrick Dubroy, michaelpg+watch-md-ui_chromium.org, dbeam+watch-history_chromium.org, pam+watch_chromium.org, jlklein+watch-closure_chromium.org, vitalyp+closure_chromium.org, dbeam+watch-closure_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD History: Add lazy-render element for simple lazy initialization. history-lazy-render provides a simple promise-based API for deferring rendering of a <template> until it is needed. This works well for elements such as menus and dialogs which are always accessed imperatively. This saves approximately 5% of time to first meaningful paint on the history page (990ms vs 950ms, n=5). BUG=629710 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a Cr-Commit-Position: refs/heads/master@{#412189}

Patch Set 1 : Add unit test #

Patch Set 2 : Rebase #

Patch Set 3 : Lazy render synced tabs menu #

Total comments: 12

Patch Set 4 : Rebase #

Patch Set 5 : Review comments, fix tests #

Total comments: 2

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -147 lines) Patch
M chrome/browser/browser_resources.grd View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/compiled_resources2.gyp View 1 2 3 5 chunks +18 lines, -3 lines 0 comments Download
M chrome/browser/resources/md_history/constants.js View 1 chunk +0 lines, -23 lines 0 comments Download
A chrome/browser/resources/md_history/externs.js View 1 chunk +58 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/history_toolbar.html View 1 chunk +14 lines, -12 lines 0 comments Download
A + chrome/browser/resources/md_history/lazy_render.html View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
A chrome/browser/resources/md_history/lazy_render.js View 1 2 3 4 1 chunk +95 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/list_container.html View 3 chunks +29 lines, -24 lines 0 comments Download
M chrome/browser/resources/md_history/list_container.js View 1 2 3 4 5 4 chunks +19 lines, -10 lines 0 comments Download
M chrome/browser/resources/md_history/synced_device_manager.html View 1 2 3 2 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/resources/md_history/synced_device_manager.js View 1 2 3 1 chunk +9 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/md_history_ui.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/webui/md_history/history_grouped_list_test.js View 1 2 3 4 2 chunks +7 lines, -5 lines 0 comments Download
M chrome/test/data/webui/md_history/history_list_test.js View 1 2 3 4 5 8 chunks +50 lines, -29 lines 0 comments Download
M chrome/test/data/webui/md_history/history_overflow_menu_test.js View 3 chunks +32 lines, -26 lines 0 comments Download
A chrome/test/data/webui/md_history/lazy_render_test.js View 1 2 3 4 1 chunk +67 lines, -0 lines 0 comments Download
M chrome/test/data/webui/md_history/md_history_browsertest.js View 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 36 (28 generated)
tsergeant
There's probably going to be a bit of a gnarly rebase when you land your ...
4 years, 4 months ago (2016-08-10 03:18:28 UTC) #15
calamity
Sweeeet. On the flip side, our tests just got a lot flushier. =( https://codereview.chromium.org/2230003002/diff/80001/chrome/browser/resources/md_history/lazy_render.js File ...
4 years, 4 months ago (2016-08-12 06:25:04 UTC) #18
tsergeant
https://codereview.chromium.org/2230003002/diff/80001/chrome/browser/resources/md_history/lazy_render.js File chrome/browser/resources/md_history/lazy_render.js (right): https://codereview.chromium.org/2230003002/diff/80001/chrome/browser/resources/md_history/lazy_render.js#newcode27 chrome/browser/resources/md_history/lazy_render.js:27: /** @private {Promise<Element>} */ On 2016/08/12 06:25:04, calamity wrote: ...
4 years, 4 months ago (2016-08-16 03:49:06 UTC) #20
calamity
lgtm. https://codereview.chromium.org/2230003002/diff/80001/chrome/browser/resources/md_history/lazy_render.js File chrome/browser/resources/md_history/lazy_render.js (right): https://codereview.chromium.org/2230003002/diff/80001/chrome/browser/resources/md_history/lazy_render.js#newcode27 chrome/browser/resources/md_history/lazy_render.js:27: /** @private {Promise<Element>} */ On 2016/08/16 03:49:06, tsergeant ...
4 years, 4 months ago (2016-08-16 07:00:01 UTC) #29
tsergeant
https://codereview.chromium.org/2230003002/diff/140001/chrome/test/data/webui/md_history/lazy_render_test.js File chrome/test/data/webui/md_history/lazy_render_test.js (right): https://codereview.chromium.org/2230003002/diff/140001/chrome/test/data/webui/md_history/lazy_render_test.js#newcode43 chrome/test/data/webui/md_history/lazy_render_test.js:43: assertNotEquals(-1, inner.textContent.indexOf('DC')); On 2016/08/16 07:00:01, calamity wrote: > Lol. ...
4 years, 4 months ago (2016-08-16 07:56:44 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2230003002/160001
4 years, 4 months ago (2016-08-16 07:57:16 UTC) #32
commit-bot: I haz the power
Committed patchset #6 (id:160001)
4 years, 4 months ago (2016-08-16 08:01:27 UTC) #34
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 08:03:28 UTC) #36
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a
Cr-Commit-Position: refs/heads/master@{#412189}

Powered by Google App Engine
This is Rietveld 408576698