New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 629710 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Not on Chrome
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug-Regression

Blocked on:
issue 641223

Blocking:
issue 588324
issue 589355



Sign in to add a comment

[MD History Page] takes 3x longer to load than old history page (signed out, local history)

Project Member Reported by tsergeant@chromium.org, Jul 20 2016

Issue description

Version: 54.0.2801.0 (Developer Build)

On a signed out profile, MD History is considerably slower than non-MD history.

To test, I created a new profile, loaded 60 random Wikipedia pages, then tested page load time of both pages. Using devtools timeline, I measured the time of the first frame which has history items painted. These numbers are from a Z620, they increase by about 6x on a low-spec Chromebook.

Old history page: 325ms average
New history page: 900ms average

Relative difference: 2.75x

Note that on a signed-in profile, result loading in the old history page will block on a network request to history.google.com, which increases load time by at least 200ms on my Australian internet.

Here's a typical trace of the MD history page: https://drive.google.com/file/d/0B_y5JvvhV806NHpJVXU4VTVnMUk/view?usp=sharing

It seems to roughly break down like this:

0-250ms: Loading resources
250-450ms: Parsing JS and initialising various things
450-650ms: Creating and attaching the <history-app> element and all its children
650-900ms: Stamping <history-item> elements into the <iron-list>
900ms: First meaningful paint
950-1300ms: Stamping more <history-item> elements offscreen.

esprehn, kschaaf, sorvell: Any help digging further into this would be appreciated. MD History is currently enabled by default on Chrome Canary.
 

Comment 1 by dbeam@chromium.org, Jul 20 2016

Labels: -Type-Bug -Pri-2 ReleaseBlock-Beta Pri-1 Type-Bug-Regression
Description: Show this description

Comment 3 by sorvell@google.com, Jul 21 2016

Here are some suggestions.

Resource loading and registration time:
 * vulcanize the resources
 * use the polymer-css-build (https://github.com/PolymerLabs/polymer-css-build)
 * upgrade to Polymer version 1.6. This version added support for native css custom properties.

Creation and runtime:
 * create elements on demand when first needed. Here are some examples: 
    * history-app's #side-bar (history-side-bar)
    * history-app's #dialog' (cr-dialog)
    * history-list's #sharedMenu (cr-shared-menu)
 * optimize history-item. Consider, for example: 
    * remove the #sizing-container and push this styling to the list container.
    * avoid creating #date-accessed when it's not displayed
    * use a higher performance version of paper-checkbox (contact @bicknellr)
    * avoid use of history-searched-label and put its functionality into history-item
    * avoid creating hidden #bookmark-star buttons
Labels: M-54
Cc: michae...@chromium.org
upgrading to 1.6.0 for the native CSS custom properties support is blocked on https://github.com/Polymer/polymer/issues/3802. Sounds like Polymer may have a fix for the release next week.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b3886ee26a2c21918dfef818c101569dce1b51a9

commit b3886ee26a2c21918dfef818c101569dce1b51a9
Author: Dan Beam <dbeam@chromium.org>
Date: Tue Jul 26 02:23:07 2016

Roll Polymer from 1.5.0 -> 1.6.0 to pick up native CSS custom props

R=michaelpg@chromium.org
TBR=michaelpg@chromium.org
BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
NOPRESUBMIT=true  # crisper.js

Review URL: https://codereview.chromium.org/2158913007 .

Cr-Commit-Position: refs/heads/master@{#407689}

[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/chrome/browser/resources/md_downloads/vulcanized.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/chromium.patch
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/app-layout/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-a11y-announcer/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-a11y-announcer/iron-a11y-announcer.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-a11y-keys-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-a11y-keys-behavior/iron-a11y-keys-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-a11y-keys/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-behaviors/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-checked-element-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-checked-element-behavior/iron-checked-element-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-collapse/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-collapse/iron-collapse-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-collapse/iron-collapse.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-dropdown/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-scroll-manager-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-fit-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-fit-behavior/iron-fit-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-icon/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-icon/iron-icon.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-list/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-location/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-location/iron-location-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-menu-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-menu-behavior/iron-menu-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/iron-overlay-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-pages/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-range-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-resizable-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/iron-scroll-target-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/neon-animation/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/neon-animation/compiled_resources2.gyp
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/neon-animation/neon-animatable.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/neon-animation/neon-animated-pages.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/neon-animation/neon-animation-runner-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-behaviors/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-button-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-checked-element-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-inky-focus-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-behaviors/paper-ripple-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-checkbox/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-checkbox/paper-checkbox.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dialog-behavior/paper-dialog-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dialog/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dialog/paper-dialog-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dialog/paper-dialog.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dropdown-menu/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dropdown-menu/paper-dropdown-menu-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dropdown-menu/paper-dropdown-menu-light-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dropdown-menu/paper-dropdown-menu-light.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-dropdown-menu/paper-dropdown-menu.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-input/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-input/paper-input.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-menu-button/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-menu-button/paper-menu-button-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-menu-button/paper-menu-button.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-ripple/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-toolbar/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/paper-toolbar/paper-toolbar.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/polymer/bower.json
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/polymer/polymer-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/polymer/polymer-micro-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/polymer/polymer-mini-extracted.js
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/polymer/polymer-mini.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components-chromium/polymer/polymer.html
[modify] https://crrev.com/b3886ee26a2c21918dfef818c101569dce1b51a9/third_party/polymer/v1_0/components_summary.txt

Comment 7 by dbeam@chromium.org, Jul 26 2016

NOTE: no custom props were actually harnessed in this ^ roll :(

I had to disable them[1] because they were breaking a lot of our UIs.

Sorry for any confusion.

[1] https://codereview.chromium.org/2181073002/
Status: Started (was: Available)
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/534998a0abe5f0a40cb87ead60162090101ce43f

commit 534998a0abe5f0a40cb87ead60162090101ce43f
Author: tsergeant <tsergeant@chromium.org>
Date: Mon Aug 08 07:40:13 2016

MD History: Improve dom-if usage in history-item

This adds a dom-if to the bookmark star, which is rarely shown and takes
time to stamp. Also removes a dom-if from a very light div which did not
need the conditional stamping.

In artificial tests, this saves about 10% of the time to stamp a list of
history-items. This should correspond to a small, 1-2% improvement on the
main history page.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2215613002
Cr-Commit-Position: refs/heads/master@{#410313}

[modify] https://crrev.com/534998a0abe5f0a40cb87ead60162090101ce43f/chrome/browser/resources/md_history/grouped_list.html
[modify] https://crrev.com/534998a0abe5f0a40cb87ead60162090101ce43f/chrome/browser/resources/md_history/history_item.html
[modify] https://crrev.com/534998a0abe5f0a40cb87ead60162090101ce43f/chrome/browser/resources/md_history/history_item.js
[modify] https://crrev.com/534998a0abe5f0a40cb87ead60162090101ce43f/chrome/browser/resources/md_history/history_list.html
[modify] https://crrev.com/534998a0abe5f0a40cb87ead60162090101ce43f/chrome/test/data/webui/md_history/history_item_test.js

I've now experimented with almost all of the suggestions in comment #3 (thanks!), and have a bunch of CLs in progress.

Here are the (very very approximate) load time improvements I expect to see from everything I've tried, based off 1000ms to load the page at master on my machine at the moment.

vulcanizing the page:                250ms
using native custom props:           50ms
lazily stamping menus, dialogs, etc: 80ms
paper-checkbox-light:                30ms

If all these work out as expected, that gets us a significant portion of the way towards where we need to be.
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d093ecc760fe41eac075f700b36ab1cc8a8a979a

commit d093ecc760fe41eac075f700b36ab1cc8a8a979a
Author: tsergeant <tsergeant@chromium.org>
Date: Tue Aug 16 08:01:07 2016

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

Review-Url: https://codereview.chromium.org/2230003002
Cr-Commit-Position: refs/heads/master@{#412189}

[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/browser_resources.grd
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/compiled_resources2.gyp
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/constants.js
[add] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/externs.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/history_toolbar.html
[add] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/lazy_render.html
[add] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/lazy_render.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/list_container.html
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/list_container.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/synced_device_manager.html
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/resources/md_history/synced_device_manager.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/browser/ui/webui/md_history_ui.cc
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/test/data/webui/md_history/history_grouped_list_test.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/test/data/webui/md_history/history_list_test.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/test/data/webui/md_history/history_overflow_menu_test.js
[add] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/test/data/webui/md_history/lazy_render_test.js
[modify] https://crrev.com/d093ecc760fe41eac075f700b36ab1cc8a8a979a/chrome/test/data/webui/md_history/md_history_browsertest.js

Project Member

Comment 12 by bugdroid1@chromium.org, Aug 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af78369e67aadb067975e87f9aab642e80e0c172

commit af78369e67aadb067975e87f9aab642e80e0c172
Author: tsergeant <tsergeant@chromium.org>
Date: Wed Aug 17 00:27:32 2016

Polymer WebUI: Enable native CSS custom properties

This enables native custom properties, which are supported in Polymer
1.6. This provides a performance improvement of about 4% for the load
time of MD History (690ms vs 720ms, n=5), and should provide a similar
improvement to all Polymer-based pages.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2252633002
Cr-Commit-Position: refs/heads/master@{#412396}

[modify] https://crrev.com/af78369e67aadb067975e87f9aab642e80e0c172/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/af78369e67aadb067975e87f9aab642e80e0c172/chrome/browser/resources/md_downloads/vulcanized.html
[modify] https://crrev.com/af78369e67aadb067975e87f9aab642e80e0c172/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.css
[modify] https://crrev.com/af78369e67aadb067975e87f9aab642e80e0c172/ui/webui/resources/js/polymer_config.js

Comment 13 by ajha@chromium.org, Aug 23 2016

Just a friendly reminder, M-54 will be branched in few days from now. Please adjust the blocker label accordingly.

Thank you!
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea829ba01d2d2d9c7498febbb860a22f2c7c7ae8

commit ea829ba01d2d2d9c7498febbb860a22f2c7c7ae8
Author: tsergeant <tsergeant@chromium.org>
Date: Wed Aug 24 06:17:39 2016

MD History: Replace more-vert iron-icon with styled divs.

The end result is identical in appearance, but avoiding stamping
many small <iron-icon>s and SVGs saves 1-2% of page load time,
and also reduces the time taken to backfill offscreen items after
first paint.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2277543003
Cr-Commit-Position: refs/heads/master@{#413994}

[modify] https://crrev.com/ea829ba01d2d2d9c7498febbb860a22f2c7c7ae8/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/ea829ba01d2d2d9c7498febbb860a22f2c7c7ae8/chrome/browser/resources/md_history/history_item.html
[modify] https://crrev.com/ea829ba01d2d2d9c7498febbb860a22f2c7c7ae8/chrome/browser/resources/md_history/shared_style.html
[modify] https://crrev.com/ea829ba01d2d2d9c7498febbb860a22f2c7c7ae8/chrome/browser/resources/md_history/synced_device_card.html

Project Member

Comment 15 by bugdroid1@chromium.org, Aug 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8761d5edaad2934302d7e4726f2c6852f062cde6

commit 8761d5edaad2934302d7e4726f2c6852f062cde6
Author: tsergeant <tsergeant@chromium.org>
Date: Wed Aug 24 14:23:35 2016

MD History: Remove usage of iron-flex-layout from MD History

iron-flex-layout is most useful for providing the vendor prefixed
versions of all the flexbox properties. As we only ever run on Blink, we
don't need these. This CL replaces all usage of @apply(--layout-*)
mixins in MD History with their native CSS equivalents. This will save a
small amount of load time now, and a small amount of vulcanized bundle
size when we enable polymer-css-build in
https://codereview.chromium.org/2268863002/.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2268073002
Cr-Commit-Position: refs/heads/master@{#414068}

[modify] https://crrev.com/8761d5edaad2934302d7e4726f2c6852f062cde6/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/8761d5edaad2934302d7e4726f2c6852f062cde6/chrome/browser/resources/md_history/history_item.html
[modify] https://crrev.com/8761d5edaad2934302d7e4726f2c6852f062cde6/chrome/browser/resources/md_history/history_toolbar.html
[modify] https://crrev.com/8761d5edaad2934302d7e4726f2c6852f062cde6/chrome/browser/resources/md_history/shared_style.html
[modify] https://crrev.com/8761d5edaad2934302d7e4726f2c6852f062cde6/chrome/browser/resources/md_history/side_bar.html
[modify] https://crrev.com/8761d5edaad2934302d7e4726f2c6852f062cde6/chrome/browser/resources/md_history/synced_device_card.html

Labels: -M-54 M-55
We're now targeting M55.

Since this bug was filed, we've made big strides. We're now down to ~2x, and we're tracking performance in the wild to make sure this is the case across all devices.

Upcoming improvements:
* polymer-css-build saves a few percent (https://codereview.chromium.org/2268863002/)
* paper-checkbox-light saves 1-2% (https://github.com/PolymerElements/paper-checkbox/pull/145)
* Shuffling around load order looks like it could improve first meaningful paint by 10-15% by preventing certain elements from loading until after paint.
* I've filed a feature request on iron-list to try and reduce jankiness immediately after first meaningful paint (https://github.com/PolymerElements/iron-list/issues/301)

On top of that:
* <cr-toolbar> is kinda expensive (removing it entirely saves ~7%), I'd like to try and reduce its impact
* There's probably more optimisations we can do within <history-list>/<history-item>, I'll spend some time tearing these apart to figure out where time is spent.
Blocking: 588324
Blockedon: 641223
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/310a320dfc58f35272e221ba1cad275a6004754d

commit 310a320dfc58f35272e221ba1cad275a6004754d
Author: tsergeant <tsergeant@chromium.org>
Date: Mon Sep 05 05:07:49 2016

MD History: Run polymer-css-build over vulcanized output

polymer-css-build preprocesses CSS to perform transformations
ahead-of-time that would otherwise need to be done by the browser during
page load. This saves approximately 5% off page load for MD History, and
should have a similar impact on MD Downloads.

BUG= 629406 , 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2268863002
Cr-Commit-Position: refs/heads/master@{#416496}

[modify] https://crrev.com/310a320dfc58f35272e221ba1cad275a6004754d/chrome/browser/resources/md_downloads/vulcanized.html
[modify] https://crrev.com/310a320dfc58f35272e221ba1cad275a6004754d/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/310a320dfc58f35272e221ba1cad275a6004754d/chrome/browser/resources/vulcanize.py
[modify] https://crrev.com/310a320dfc58f35272e221ba1cad275a6004754d/docs/vulcanize.md

Some more ideas:

I talked briefly with Tim about lazily (or just not) loading code for synced tabs when loading the main list.  What happened with that?

Are we loading grouped mode code in non-grouped mode?

Have we tried running Closure Compiler to eliminate dead code or do performance optimizations on the crisped JavaScript (without renaming)?

How much is saved if we make <history-item> into vanilla <div>s instead of using shadow DOM?

Can we move time gap separators to being created imperatively (i.e. createElement('div').className='time-gap') instead of just being hidden in the DOM?

Can we drop <paper-checkbox> (which is creating a whole bunch of labels but not actually filling the <content>)?  I think just making an <iron-icon> with tabindex=0 and lazily creating a ripple and responding to up/down actions would probably give us gains.
also, can we dynamically create these <paper-ripple>s?

https://cs.chromium.org/chromium/src/chrome/browser/resources/md_history/side_bar.html?l=88

obviously, I'm trusting you guys (tsergeant, calamity) to prioritize or reject these based on the amount of time they seem to save.
also, why do we need <history-search-label>?  can't we implement the bolding of search terms without creating another level of shadow DOM / bindings / this light component?

https://cs.chromium.org/chromium/src/chrome/browser/resources/md_history/history_item.html?l=161
Project Member

Comment 23 by bugdroid1@chromium.org, Sep 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78

commit 5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78
Author: tsergeant <tsergeant@chromium.org>
Date: Tue Sep 06 07:43:10 2016

MD History: Remove shadow root from <history-searched-label>

The <history-searched-label> element directly modifies its own DOM
without using a template or styling. The <template> and corresponding
shadow root can be removed without affecting the functionality of the
element.

Removing these saves one shadow root and one div per <history-item>
element, which has a very minor performance impact while also
simplifying the element.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2313823002
Cr-Commit-Position: refs/heads/master@{#416603}

[modify] https://crrev.com/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78/chrome/browser/resources/md_history/searched_label.html
[modify] https://crrev.com/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78/chrome/browser/resources/md_history/searched_label.js
[modify] https://crrev.com/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78/chrome/test/data/webui/md_history/history_list_test.js
[modify] https://crrev.com/5e1f45d8c5fff4a1e635616bace6ce4f6ec3aa78/chrome/test/data/webui/md_history/history_synced_tabs_test.js

Project Member

Comment 24 by bugdroid1@chromium.org, Sep 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9844d8891a6c83304ba67ca07e55b7c658e958e9

commit 9844d8891a6c83304ba67ca07e55b7c658e958e9
Author: tsergeant <tsergeant@chromium.org>
Date: Tue Sep 06 07:59:34 2016

MD WebUI: Use dom-if to control hidden elements in <cr-toolbar>

This allows the <paper-spinner-lite> and the clear <paper-icon-button>
to not be stamped until they are needed. This results in a small
performance improvement (5-10ms on my Z620) across all pages which use
<cr-toolbar>. In particular, this is a 1-2% improvement in MD History.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2311093002
Cr-Commit-Position: refs/heads/master@{#416604}

[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/chrome/browser/resources/md_downloads/vulcanized.html
[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/chrome/test/data/webui/cr_elements/cr_toolbar_search_field_tests.js
[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
[modify] https://crrev.com/9844d8891a6c83304ba67ca07e55b7c658e958e9/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js

Responding inline

> lazily loading code for synced tabs when loading the main list

It's basically implemented. There's just a couple of other things that I'm waiting to shake out before I send it to review. In particular:
  - Lazy-loading invisible things has a pretty small perf impact since they're already lazy registered and rendered. The big win comes from lazy-loading checkboxes and buttons, but I'm waiting for paper-checkbox-light to see if that changes the situation.
  - Lazy-loading all these things means they need to be loaded some time after first paint, and scheduling when that happens is kind of nasty. I'm waiting for iron-list stamping [1] to shake out before I try this.

> Are we loading grouped mode code in non-grouped mode?

See above.

> Have we tried running Closure Compiler to eliminate dead code

We've been talking to our friendly local devrel (notably, author of [2]) about this, but haven't actually tried anything yet

> How much is saved if we make <history-item> into vanilla <div>s instead of using shadow DOM?

Do you mean removing the <history-item> element and making that code a direct descendant of iron-list? We can't do that because of Grouped History, but it's still a worthwhile thing to try to see if it improves things. I'll look into it.

> Can we move time gap separators to being created imperatively

As discussed, this fits into the category of "changes which should improve things but are too small to measure"

> Can we drop <paper-checkbox>

paper-checkbox takes about 40% of the time to stamp a <history-item>. I think <paper-checkbox-light> will about halve that (I'm not really sure exactly).
The next step after that is probably to do some fancy styling with a native <input type="checkbox"> (similar to the Polymer Shop demo [3]), but at that point there's enough extra things to get right that we might not save much compared to <paper-checkbox-light>.

> also, can we dynamically create these <paper-ripple>s?

Yup, although this will be a very minor impact.

> also, why do we need <history-search-label>?

<history-searched-label> exists to share code between <history-list> and <synced-device-card>. We could probably implement it with a behavior instead, but we haven't ever been able to measure any significant performance impact from using it. I've also now removed the extra layer of shadow dom (#23) which has a minor saving and makes it look nicer in devtools.

[1] https://github.com/PolymerElements/iron-list/issues/301
[2] https://developers.googleblog.com/2016/08/closure-compiler-in-javascript.html
[3] https://github.com/Polymer/shop/blob/91d21477f030db1ce97981fcd7d503550d9730ba/src/shop-checkbox.html
Project Member

Comment 26 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9a774fad351d0f7a648af4be7c7ad82e06b7a62

commit c9a774fad351d0f7a648af4be7c7ad82e06b7a62
Author: dbeam <dbeam@chromium.org>
Date: Wed Sep 07 16:39:09 2016

MD History: truncate title to 300 chars in C++ instead of JS

Potentially communicates less data over IPC, lets the UI do less work.

R=tsergeant@chromium.org
BUG= 621347 , 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2318643003
Cr-Commit-Position: refs/heads/master@{#416961}

[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/history/history_browsertest.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/resources/md_history/constants.js
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/resources/md_history/history_item.html
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/resources/md_history/history_item.js
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/browsing_history_handler.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/browsing_history_handler.h
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/log_web_ui_url_browsertest.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/md_history_ui.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/md_history_ui.h
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/browser/ui/webui/uber/uber_ui_browsertest.cc
[modify] https://crrev.com/c9a774fad351d0f7a648af4be7c7ad82e06b7a62/chrome/test/data/webui/md_history/history_item_test.js

Project Member

Comment 27 by bugdroid1@chromium.org, Sep 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3

commit 938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3
Author: dbeam <dbeam@chromium.org>
Date: Sat Sep 10 03:19:41 2016

Roll performance-oriented iron-list changes

On Linux on my Z620:

Old UI: ~700ms
New UI (960px high): ~625ms
New UI (1920px high): ~850ms

This puts History in the realm of ship-ability, depending on user screen size.

Test fix courtesy of michaelpg@ here:
https://codereview.chromium.org/2331593002/

R=hcarmona@chromium.org
BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2324293002
Cr-Commit-Position: refs/heads/master@{#417813}

[modify] https://crrev.com/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3/chrome/test/data/webui/settings/languages_page_browsertest.js
[modify] https://crrev.com/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3/third_party/polymer/v1_0/components-chromium/iron-list/bower.json
[modify] https://crrev.com/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3/third_party/polymer/v1_0/components-chromium/iron-list/iron-list-extracted.js
[modify] https://crrev.com/938d5431c9cbb0a6ded5f2d5fdc5a4091b3c0ab3/third_party/polymer/v1_0/components_summary.txt

Comment 28 by dbeam@chromium.org, Sep 11 2016

esprehn@, tsergeant@, calamity@: ^ I think this helped a lot.  can we check/quantify on Canary?  I'm getting fairly similar numbers between old and new history UIs on my Mac Book Pro.

note: screen height matters a lot to these numbers in this brave new virtual list world.

Comment 29 by ajha@chromium.org, Sep 12 2016

Cc: nyerramilli@chromium.org ranjitkan@chromium.org
 Issue 642264  has been merged into this issue.
Project Member

Comment 30 by bugdroid1@chromium.org, Sep 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d

commit b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d
Author: dbeam <dbeam@chromium.org>
Date: Tue Sep 13 07:25:23 2016

Replace paper-checkbox with a paper-icon-button-light

Here are some times until chrome://history is
pained/scrollable/interactive on my Z620 with Linux and a 1920px high
monitor (worst case for height-based optimization):

New UI: ~675ms
Old UI: ~700ms

Note: the new UI (at this monitor height) before my change took about
~870ms, so this denotes a 23% improvement for very tall monitors.

BUG= 629710 
R=tsergeant@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2336503002
Cr-Commit-Position: refs/heads/master@{#418187}

[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/browser/resources/md_history/history_item.html
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/browser/resources/md_history/history_item.js
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/browser/resources/md_history/history_list_behavior.js
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/test/data/webui/md_history/history_grouped_list_test.js
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/test/data/webui/md_history/history_list_test.js
[modify] https://crrev.com/b0b9fe38332b78ea9c1767619d3e8e6b96fbb76d/chrome/test/data/webui/md_history/lazy_render_test.js

Project Member

Comment 31 by bugdroid1@chromium.org, Sep 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cf585f19edbbbfcfabd421a057e68a1d4cee860f

commit cf585f19edbbbfcfabd421a057e68a1d4cee860f
Author: tsergeant <tsergeant@chromium.org>
Date: Fri Sep 23 02:35:48 2016

MD History: Lazily load element files which are not needed for first paint

This splits out many invisible or heavy elements into a separate
lazy_load.html file, which is only imported after the main app has
rendered. Where necessary, simple CSS shims are added to prevent visible
changes to the page.

In effect, this splits apart the first meaningful paint from the page
being fully interactive, and in the process improves first meaningful
paint by 10-15%.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2264983002
Cr-Commit-Position: refs/heads/master@{#420550}

[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/PRESUBMIT.py
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/browser_resources.grd
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/PRESUBMIT.py
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/app.html
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/app.js
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/history_item.html
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/history_toolbar.html
[add] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/lazy_load.crisper.js
[add] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/lazy_load.html
[add] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/lazy_load.vulcanized.html
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/list_container.html
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/md_history/shared_style.html
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/resources/vulcanize.py
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/browser/ui/webui/md_history_ui.cc
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/test/data/webui/md_history/history_grouped_list_test.js
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/test/data/webui/md_history/history_routing_test.js
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/chrome/test/data/webui/md_history/md_history_browsertest.js
[modify] https://crrev.com/cf585f19edbbbfcfabd421a057e68a1d4cee860f/tools/copyright_scanner/third_party_files_whitelist.txt

Project Member

Comment 32 by bugdroid1@chromium.org, Sep 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73e5d0ee1756905fbb7d9ca932394735ac2a2f67

commit 73e5d0ee1756905fbb7d9ca932394735ac2a2f67
Author: tsergeant <tsergeant@chromium.org>
Date: Fri Sep 23 11:27:39 2016

MD History: Replace app-route with a custom router

app-route is a fairly heavy-weight element, supporting complex routing
patterns designed for large pages. This is unnecessary for MD History,
which currently has one routing pattern and one query parameter.

This CL replaces app-route with a custom router, <history-router>, which
is responsible for two-way binding between the page state and the page
URL. This also refactors handling of search terms elsewhere in the app
to ensure that changes to the search term are reflected correctly across
the page.

This CL has a small positive impact on load time (~20ms on a Z620), code
health (all routing is handled in one place) and binary size (app-route
can be deleted from the binary).

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2352293002
Cr-Commit-Position: refs/heads/master@{#420590}

[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/browser_resources.grd
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/app.html
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/app.js
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/compiled_resources2.gyp
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/history_toolbar.js
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/list_container.js
[add] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/router.html
[add] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/router.js
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/side_bar.html
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/resources/md_history/side_bar.js
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/browser/ui/webui/md_history_ui.cc
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/chrome/test/data/webui/md_history/history_routing_test.js
[modify] https://crrev.com/73e5d0ee1756905fbb7d9ca932394735ac2a2f67/third_party/polymer/v1_0/find_unused_elements.py

Just wanted to point out that the title of this bug seems to be incorrect: page load performance is not 3x of the old history page (if it were, that would be a good thing). I assume it should instead read something like "page load time is 3x of the old history page". Maybe at this late date it doesn't make a difference, but it's not a helpful description to someone coming across this bug.

Comment 34 by dbeam@chromium.org, Sep 23 2016

Summary: [MD History Page] takes 3x longer to load than old history page (signed out, local history) (was: [MD History] Signed out page load performance is 3x old history page)

Comment 35 by ajha@chromium.org, Sep 26 2016

Just to update bug is marked as Beta blocker and M-55 is expected to be branched in 1 or 2 weeks time.
Project Member

Comment 36 by bugdroid1@chromium.org, Sep 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8739bc4bcb3659b6c4dc4b88e88e246581f70363

commit 8739bc4bcb3659b6c4dc4b88e88e246581f70363
Author: tsergeant <tsergeant@chromium.org>
Date: Tue Sep 27 08:40:07 2016

Polymer WebUI: Remove app-route from Polymer components

MD History, which was the only user of this element, moved away from it
in https://codereview.chromium.org/2352293002/. It can now be safely
removed from the binary and repository.

BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2357093002
Cr-Commit-Position: refs/heads/master@{#421148}

[modify] https://crrev.com/8739bc4bcb3659b6c4dc4b88e88e246581f70363/third_party/polymer/v1_0/bower.json
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-location-extracted.js
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-location.html
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-route-converter-behavior-extracted.js
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-route-converter-behavior.html
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-route-converter-extracted.js
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-route-converter.html
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-route-extracted.js
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/app-route.html
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/bower.json
[delete] https://crrev.com/19bbb19e941fc12b0ad4fce98d789f7e9f23755b/third_party/polymer/v1_0/components-chromium/app-route/compiled_resources2.gyp
[modify] https://crrev.com/8739bc4bcb3659b6c4dc4b88e88e246581f70363/third_party/polymer/v1_0/find_unused_elements.py
[modify] https://crrev.com/8739bc4bcb3659b6c4dc4b88e88e246581f70363/ui/webui/resources/polymer_resources.grdp

Project Member

Comment 37 by bugdroid1@chromium.org, Sep 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05f3dc10c223b31bb487259c8515dd93852df4c9

commit 05f3dc10c223b31bb487259c8515dd93852df4c9
Author: dbeam <dbeam@chromium.org>
Date: Wed Sep 28 18:00:39 2016

MD Downloads/History: make javascript uglier and more compact

This CL removes the --beautify option from the uglifyjs step in
vulcanize.py.  This reduces resource size at the cost of code
readability.

Before:

$ du -sh chrome/browser/resources/md_*/*crisper.js
208K    chrome/browser/resources/md_downloads/crisper.js
168K    chrome/browser/resources/md_history/app.crisper.js
100K    chrome/browser/resources/md_history/lazy_load.crisper.js

After:

$ du -sh chrome/browser/resources/md_*/*crisper.js
156K    chrome/browser/resources/md_downloads/crisper.js
128K    chrome/browser/resources/md_history/app.crisper.js
76K     chrome/browser/resources/md_history/lazy_load.crisper.js

Seems to save 52K for downloads and 64K for history's resources.

R=tsergeant@chromium.org
BUG= 629710 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2371383003
Cr-Commit-Position: refs/heads/master@{#421565}

[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/md_downloads/vulcanized.html
[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/md_history/lazy_load.crisper.js
[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/md_history/lazy_load.vulcanized.html
[modify] https://crrev.com/05f3dc10c223b31bb487259c8515dd93852df4c9/chrome/browser/resources/vulcanize.py

As an update, we're now pretty close to load-time performance parity on machines with SSDs (1.2x or so).

We're seeing higher numbers (2x or so) on machines with spinning disks, presumably because we're loading significantly more resources off disk (although there might be other factors at play).

We'll work towards driving this difference down over the next week before branch point.
This bug is reported as M55 Beta blocker.Please try to resolve this before M55 branch on Oct 6th,2016 so it has enough baking time in Dev.


A friendly reminder that M55 Beta launch is coming soon! Your bug is labelled as Beta ReleaseBlock, pls make sure to land the fix ASAP. Thank you.
Labels: -ReleaseBlock-Beta ReleaseBlock-Stable
Status: Fixed (was: Started)
i'm calling this fixed for the machines we test on
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-55; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-55 label, otherwise remove Merge-TBD label. Thanks.
Labels: -Merge-TBD
CL listed at #37 landed before M55 branch. No M55 merge is needed.

Sign in to add a comment