Minify Source/core/streams |
|||
Issue descriptionInitial 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.
,
Nov 6 2017
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.
,
Nov 5
Not feasible. Will port to C++ instead. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ricea@chromium.org
, Sep 4 2017