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

Issue 629406 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Not on Chrome
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[MD History] Vulcanize history page

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

Issue description

Vulcanize still looks like it will give a significant performance boost to the history page.

On my Z620, a vulcanized version of the history page reduces time to first meaningful paint from 900ms to 710ms on average. Less powerful devices stand to gain even more, with a Daisy Chromebook spending around 2 seconds of page load time loading resources.

dbeam@: What is the current plan for this in Settings?
 

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

Cc: michae...@chromium.org
settings is a hard nut to crack.  we have a ton if platform-dependent code.  does history have many <if> tags?  if not, vulcanizing will be easier.

you're welcome to look at how downloads does this, but it's proved to be a constant pain in the current state (i.e. you have to run chrome/browser/resources/md_downloads/vulcanize.py manually)
if you do need the <if> preprocessing, talk to me and/or check out https://codereview.chromium.org/1870853003/
Owner: tsergeant@chromium.org
Status: Assigned (was: Available)
Project Member

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

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

commit 72f1b524959fbf7ec4868f1a289c7ea3c467f14d
Author: tsergeant <tsergeant@chromium.org>
Date: Wed Aug 17 02:06:41 2016

Vulcanize MD History to improve page-load performance

Vulcanize is a module which concatenates HTML/JS files together and
greatly improves load-time performance for Polymer WebUI pages. This CL
generalises the vulcanize script used for MD Downloads so that it can
be used for history as well. Also adds uglifyjs to the vulcanize
toolchain, which is used to strip excess comments and whitespace from
the generated files.

The net result is a saving of 25% on the time taken to load the MD
History page (average times 1005ms vs 750ms, n=5), but an approximately
450Kb increase to the size of resources.pak. A follow-up CL to strip
comments from the vulcanize output will reduce this size increase to
150Kb.

BUG= 629406 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
NOPRESUBMIT=true
TBR=phajdan.jr@chromium.org

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

[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/PRESUBMIT.py
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/browser_resources.grd
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_downloads/crisper.js
[delete] https://crrev.com/702d65e434b5a41965f5b9fbe644e9e4300157b6/chrome/browser/resources/md_downloads/vulcanize.py
[add] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_history/PRESUBMIT.py
[add] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_history/app.js
[add] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_history/app.vulcanized.html
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_history/history.html
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/md_history/history_toolbar.html
[add] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/resources/vulcanize.py
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/browser/ui/webui/md_history_ui.cc
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/chrome/test/data/webui/md_history/history_toolbar_test.js
[rename] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/docs/vulcanize.md
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/third_party/polymer/v1_0/find_unused_elements.py
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/third_party/polymer/v1_0/reproduce.sh
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/tools/copyright_scanner/third_party_files_whitelist.txt
[modify] https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d/ui/webui/resources/html/util.html

Project Member

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

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

commit ecf295d7196a5865ce7edeb753dff19acf83db69
Author: calamity <calamity@chromium.org>
Date: Fri Aug 19 06:07:17 2016

[MD History] Use modified time to check staleness of vulcanize and crisper.

This CL changes the MD History presubmit script to check the modified
time to check if vulcanize needs to be run. This will throw up some false
positives but should be safer overall.

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

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

[modify] https://crrev.com/ecf295d7196a5865ce7edeb753dff19acf83db69/chrome/browser/resources/md_history/PRESUBMIT.py

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 19 2016

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

commit ce13eef039ce8ac44ae999ce62fd1bc3e0f0d069
Author: tsergeant <tsergeant@chromium.org>
Date: Fri Aug 19 06:39:36 2016

MD WebUI: Uglify vulcanized javascript bundles to remove comments/whitespace

We run uglify in 'beautify' mode so that output is still human-readable,
but comments and whitespace are removed. This reduces the size of
resources.pak by 330K.

BUG= 629406 , 638624 
NOPRESUBMIT=true # crisper.js
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

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

[modify] https://crrev.com/ce13eef039ce8ac44ae999ce62fd1bc3e0f0d069/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/ce13eef039ce8ac44ae999ce62fd1bc3e0f0d069/chrome/browser/resources/md_history/app.crisper.js
[modify] https://crrev.com/ce13eef039ce8ac44ae999ce62fd1bc3e0f0d069/chrome/browser/resources/vulcanize.py
[modify] https://crrev.com/ce13eef039ce8ac44ae999ce62fd1bc3e0f0d069/docs/vulcanize.md

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 23 2016

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

commit 8ec9430cce290817d358bf8fed2ff7015b63cb4f
Author: calamity <calamity@chromium.org>
Date: Tue Aug 23 03:56:29 2016

Fix MD History PRESUBMIT.

This CL adds vulcanize and crisper generated files to the PRESUBMIT
exclusion and fixes an issue where the MD History PRESUBMIT script would
always fail after vulcanize.py was run.

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

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

[modify] https://crrev.com/8ec9430cce290817d358bf8fed2ff7015b63cb4f/PRESUBMIT.py
[modify] https://crrev.com/8ec9430cce290817d358bf8fed2ff7015b63cb4f/chrome/browser/resources/md_history/PRESUBMIT.py

Project Member

Comment 8 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

Status: Fixed (was: Assigned)
Vulcanize is working well for us, so I'm closing this bug.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 24 2016

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

commit 3674a562b4e1138094ac37e0d40b41ed56b16529
Author: calamity <calamity@chromium.org>
Date: Thu Nov 24 22:35:44 2016

Add the exact versions to the vulcanize.md install command.

BUG= 629406 

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

[modify] https://crrev.com/3674a562b4e1138094ac37e0d40b41ed56b16529/docs/vulcanize.md

Sign in to add a comment