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

Issue 2224003003: Vulcanize MD History to improve page-load performance (Closed)

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

Description

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 Committed: https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d Cr-Commit-Position: refs/heads/master@{#412420}

Patch Set 1 : Rebase, revulcanize, avoid duplicating files #

Total comments: 18

Patch Set 2 : dbeam comments #

Patch Set 3 : Change to keyword arguments #

Total comments: 12

Patch Set 4 : Revulcanize and address comments #

Patch Set 5 : Fix Mac/CrOS #

Patch Set 6 : Revulcanize #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16241 lines, -8934 lines) Patch
M chrome/browser/PRESUBMIT.py View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 3 4 5 1 chunk +37 lines, -29 lines 0 comments Download
M chrome/browser/resources/md_downloads/crisper.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/resources/md_downloads/vulcanize.py View 1 chunk +0 lines, -85 lines 0 comments Download
D chrome/browser/resources/md_downloads/vulcanize_readme.md View 1 chunk +0 lines, -54 lines 0 comments Download
A chrome/browser/resources/md_history/PRESUBMIT.py View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/app.js View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/resources/md_history/app.crisper.js View 1 2 3 4 5 6 3 chunks +12105 lines, -8727 lines 0 comments Download
A chrome/browser/resources/md_history/app.vulcanized.html View 1 2 3 4 5 1 chunk +3997 lines, -0 lines 0 comments Download
M chrome/browser/resources/md_history/history.html View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/md_history/history_toolbar.html View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
A + chrome/browser/resources/vulcanize.py View 1 2 3 6 chunks +35 lines, -15 lines 0 comments Download
M chrome/browser/ui/webui/md_history_ui.cc View 1 2 3 4 5 3 chunks +15 lines, -7 lines 0 comments Download
M chrome/test/data/webui/md_history/history_toolbar_test.js View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
A + docs/vulcanize.md View 1 4 chunks +11 lines, -9 lines 0 comments Download
M third_party/polymer/v1_0/find_unused_elements.py View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/polymer/v1_0/reproduce.sh View 1 chunk +2 lines, -2 lines 0 comments Download
M tools/copyright_scanner/third_party_files_whitelist.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/webui/resources/html/util.html View 1 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 60 (37 generated)
michaelpg
this was my version, which didn't separate app.*: https://codereview.chromium.org/2235593002/ i had initially cheated by removing ...
4 years, 4 months ago (2016-08-10 01:43:00 UTC) #8
tsergeant
On 2016/08/10 01:43:00, michaelpg wrote: > this was my version, which didn't separate app.*: > ...
4 years, 4 months ago (2016-08-10 02:46:59 UTC) #9
tsergeant
> I haven't actually tried the other alternative, though. I'll give it a go this ...
4 years, 4 months ago (2016-08-10 03:55:53 UTC) #10
tsergeant
+dbeam to review, cc calamity as FYI https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py File chrome/browser/resources/vulcanize.py (right): https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py#newcode89 chrome/browser/resources/vulcanize.py:89: _run_cmd(['uglifyjs', js_out_path, ...
4 years, 4 months ago (2016-08-10 06:40:34 UTC) #15
Dan Beam
can we do uglify separately? i'd like to minimize the variables between potential regressions. if ...
4 years, 4 months ago (2016-08-10 18:17:42 UTC) #16
tsergeant
I've removed uglify for now and will add it back in a follow-up. https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py File ...
4 years, 4 months ago (2016-08-11 01:28:27 UTC) #19
Dan Beam
lgtm let's see what blows up! https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py File chrome/browser/resources/vulcanize.py (right): https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py#newcode52 chrome/browser/resources/vulcanize.py:52: def vulcanize(directory, host, ...
4 years, 4 months ago (2016-08-11 02:29:50 UTC) #21
tsergeant
Thanks for reviewing, Dan. I'll hold off on committing until I'm back in office on ...
4 years, 4 months ago (2016-08-11 03:28:01 UTC) #23
Dan Beam
still lgtm but https://codereview.chromium.org/2224003003/diff/110001/chrome/browser/resources/vulcanize.py File chrome/browser/resources/vulcanize.py (right): https://codereview.chromium.org/2224003003/diff/110001/chrome/browser/resources/vulcanize.py#newcode53 chrome/browser/resources/vulcanize.py:53: js_out_file='crisper.js', extra_args=None): can we me all ...
4 years, 4 months ago (2016-08-11 05:44:34 UTC) #24
michaelpg
https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py File chrome/browser/resources/vulcanize.py (right): https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py#newcode79 chrome/browser/resources/vulcanize.py:79: '<include src="', '<include src="../../../../ui/webui/resources/js/')) On 2016/08/11 03:28:00, tsergeant wrote: ...
4 years, 4 months ago (2016-08-11 07:42:15 UTC) #26
aberent
I am slightly confused by this. Grit already has the ability to inline scripts, and ...
4 years, 4 months ago (2016-08-11 09:27:22 UTC) #27
Dan Beam
On 2016/08/11 09:27:22, aberent wrote: > I am slightly confused by this. Grit already has ...
4 years, 4 months ago (2016-08-11 17:53:29 UTC) #28
tsergeant
https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py File chrome/browser/resources/vulcanize.py (right): https://codereview.chromium.org/2224003003/diff/30001/chrome/browser/resources/vulcanize.py#newcode79 chrome/browser/resources/vulcanize.py:79: '<include src="', '<include src="../../../../ui/webui/resources/js/')) On 2016/08/11 07:42:14, michaelpg wrote: ...
4 years, 4 months ago (2016-08-15 05:54:19 UTC) #29
tsergeant
On 2016/08/11 09:27:22, aberent wrote: > Grit also, now (since https://codereview.chromium.org/2179033002 landed), has > the ...
4 years, 4 months ago (2016-08-15 06:00:00 UTC) #30
tsergeant
https://codereview.chromium.org/2224003003/diff/110001/ui/webui/resources/html/util.html File ui/webui/resources/html/util.html (right): https://codereview.chromium.org/2224003003/diff/110001/ui/webui/resources/html/util.html#newcode1 ui/webui/resources/html/util.html:1: <link rel="import" href="chrome://resources/html/assert.html"> On 2016/08/11 07:42:14, michaelpg wrote: > ...
4 years, 4 months ago (2016-08-15 06:22:07 UTC) #31
Dan Beam
On 2016/08/15 06:22:07, tsergeant wrote: > https://codereview.chromium.org/2224003003/diff/110001/ui/webui/resources/html/util.html > File ui/webui/resources/html/util.html (right): > > https://codereview.chromium.org/2224003003/diff/110001/ui/webui/resources/html/util.html#newcode1 > ...
4 years, 4 months ago (2016-08-15 17:55:41 UTC) #32
tsergeant
phajdan.jr@: Ping, can you please take a look? dbeam/michaelpg@: Are you happy for me to ...
4 years, 4 months ago (2016-08-16 08:30:37 UTC) #48
Dan Beam
On 2016/08/16 08:30:37, tsergeant wrote: > phajdan.jr@: Ping, can you please take a look? > ...
4 years, 4 months ago (2016-08-16 22:18:53 UTC) #51
michaelpg
lgtm but you may want to re-vulcanize after https://codereview.chromium.org/2249943002/ to get rid of some <if>s ...
4 years, 4 months ago (2016-08-16 22:40:02 UTC) #52
tsergeant
Moving phajdan.jr@ to TBR.
4 years, 4 months ago (2016-08-17 01:15:27 UTC) #54
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/2224003003/210001
4 years, 4 months ago (2016-08-17 01:16:18 UTC) #57
commit-bot: I haz the power
Committed patchset #7 (id:210001)
4 years, 4 months ago (2016-08-17 02:07:02 UTC) #58
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 02:08:26 UTC) #60
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/72f1b524959fbf7ec4868f1a289c7ea3c467f14d
Cr-Commit-Position: refs/heads/master@{#412420}

Powered by Google App Engine
This is Rietveld 408576698