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

Issue 653332 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Gzip material design pages for slow disks

Project Member Reported by dbeam@chromium.org, Oct 6 2016

Issue description

The new Material Design pages use Polymer[1].  This requires pulling in a bit of HTML/CSS/JS.  We combine it with a tool named vulcanize[2], then extract the JavaScript with a tool named crisper[3], and lastly minify with uglify[4].  For docs on this process, see here: https://chromium.googlesource.com/chromium/src/+/master/docs/vulcanize.md

We do the best we can to reduce the size of the resources when loaded off disk, but we can do more.

Recently, smaier@ (intern) and agrieve@ adding gzip compression to on-disk resources (i.e. after being unpacked) mainly for internals pages on Android.  I tweaked the implementation to use the same streaming gunzip that the net stack uses when decoding gzipped network resources.  Then I enabled it on the old/mobile history page, and agrieve@ and smaier@ turned it on to a ton of internals pages.

We should try gzipping Material UIs on desktop for those with slow disks.

Right now one of the few impediments from this is that we have a $i18n{} preprocessing system that adds translations before sending to the renderer.  When compression is turned on, this system scans through the compressed content (which is obviously wasteful and doesn't work).  So, my plan is to write a streaming $i18n{} processing via net::FilterStream or whatever the modern equivalent is (which is in flux right now).

We'll monitor things like History.ResultsRenderedTime to see if this has a positive effect on UMA users load time.

[1] https://www.polymer-project.org/1.0/
[2] https://github.com/Polymer/vulcanize
[3] https://github.com/PolymerLabs/crisper
[4] https://github.com/mishoo/UglifyJS
 

Comment 1 by dbeam@chromium.org, Oct 6 2016

Description: Show this description
Cc: -lshang@chromium.org

Comment 3 by dbeam@chromium.org, Dec 20 2016

Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 23 2016

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

commit d2f894f476b94600d3db7d25ff15d29819177c43
Author: dbeam <dbeam@chromium.org>
Date: Fri Dec 23 02:18:20 2016

MD Downloads: gzip vulcanized resources via compress="gzip"

Reduces the amount of data stored and read from disk by 190419 bytes.

Also, change the API in WebUIDataSource from:

  void DisableI18nAndUseGzipForAllPaths()
  void ExcludePathFromGzip(const std::string& path)

to just:

  void UseGzip(const std::unordered_set<std::string>& excluded_paths)

because:

- $i18n{} support was added for gzipped resources[1], so the
  "DisableI18nAnd" no longer makes sense.

- "ForAllPaths" makes less sense as it requires a list of exclusions.

R=jam@chromium.org
BUG= 653332 
NOTRY=true  # see https://codereview.chromium.org/2597403002/

[1] https://codereview.chromium.org/2544683002/

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

[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/browser_resources.grd
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/domain_reliability_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/engagement/site_engagement_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/gcm_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/history_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/invalidations_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/offline/offline_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/password_manager_internals/password_manager_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/predictors/predictors_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/profiler_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/signin_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/snippets_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/supervised_user_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/usb_internals/usb_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/chrome/browser/ui/webui/vr_shell/vr_shell_ui_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/accessibility/accessibility_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/appcache/appcache_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/gpu/gpu_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/indexed_db/indexed_db_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/media/media_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/service_worker/service_worker_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/webrtc/webrtc_internals_ui.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/webui/web_ui_data_source_impl.cc
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/browser/webui/web_ui_data_source_impl.h
[modify] https://crrev.com/d2f894f476b94600d3db7d25ff15d29819177c43/content/public/browser/web_ui_data_source.h

Project Member

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

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

commit ed32c72638ed71f68b0abe42bfb46f073ae6ebe7
Author: dbeam <dbeam@chromium.org>
Date: Fri Dec 23 02:32:48 2016

MD History: gzip vulcanized resources via compress="gzip"

Saves 267950 bytes from being stored and read from disk.

R=tsergeant@chromium.org
BUG= 653332 

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

[modify] https://crrev.com/ed32c72638ed71f68b0abe42bfb46f073ae6ebe7/chrome/browser/browser_resources.grd
[modify] https://crrev.com/ed32c72638ed71f68b0abe42bfb46f073ae6ebe7/chrome/browser/ui/webui/md_history_ui.cc

Comment 7 by dpa...@chromium.org, Apr 26 2017

Anything left to do here?

Comment 8 by dbeam@chromium.org, Apr 26 2017

Status: Fixed (was: Started)
not really

Sign in to add a comment