New issue
Advanced search Search tips

Issue 759523 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Bug



Sign in to add a comment

Minify Source/core/streams

Project Member Reported by ricea@chromium.org, Aug 28 2017

Issue description

Initial experimentation with uglifyjs demonstrates a small but useful saving of around 60K (to 27% of the unminified size).

This can also be expected to mitigate memory regressions due to Streams API changes (issue 759519) and possibly improve cold performance ( issue 661979 ).

Testing was performed with the command-line:

../../../../node/node_modules/uglify-es/bin/uglifyjs WritableStream.js -m -c ecma=6,expression=true -o $file.new -- $file && mv $file.new $file

There are some security concerns. We need to ensure that uglifyjs does not perform any transformations that violate our security constraints.
 

Comment 1 by ricea@chromium.org, Sep 4 2017

Components: Blink>Network>StreamsAPI

Comment 2 by ricea@chromium.org, Nov 6 2017

Cc: ricea@chromium.org
Owner: ----
Status: Available (was: Assigned)
Running uglify is easy. The hard part is persuading gn to generate a usable dependency graph. We need uglify to happen before the snapshot is created, but I can't find a sane way to create a dependency from the v8 snapshot creation on our streams files.

I think what we would need to do is always create the snapshot outside of v8 as a separate build step. The work on snapshots for Blink may partially enable this: https://docs.google.com/document/d/1jpQQX0piaxcHJPWakp_Kr_03g5Gnma5h5-Kdlqu7jVQ/edit

A hackier approach would be to modify js2c to take a preprocessing step as an argument and then pass in the command line for uglifyjs as a gn variable. This is unappealing.
Status: WontFix (was: Available)
Not feasible. Will port to C++ instead.

Sign in to add a comment