Chromium Code Reviews| Index: README.md |
| diff --git a/README.md b/README.md |
| index e04a96b726c4eacb9da7e6402faa68de42527fa8..6ee921072e7cd25ce781bc01589ed52cb4f8d751 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -73,11 +73,14 @@ The following tools are a available today: |
| was split into deferred parts as expected. This tool takes a specification |
| of the expected layout of code into deferred parts, and checks that the |
| output from `dart2js` meets the specification. |
| - |
| + |
| * [`deferred_library_size`][deferred_size]: a tool that gives a breakdown of |
| the sizes of the deferred parts of the program. This can show how much of |
| your total code size can be loaded deferred. |
| + * [`deferred_library_layout`][deferred_layout]: a tool that reports which |
| + code is included on each output unit. |
| + |
| * [`function_size_analysis`][function_analysis]: a tool that shows how much |
| code was attributed to each function. This tool also uses dependency |
| information to compute dominance and reachability data. This information can |
| @@ -270,6 +273,48 @@ Deferred code size 8888888 |
| Percent of code deferred 41.86% |
| ``` |
| +### Deferred library layout tool |
| + |
| +This tool reports which code is included on each output unit. It can be run as |
|
Harry Terkelsen
2016/11/01 23:30:39
on -> in
Siggi Cherem (dart-lang)
2016/11/01 23:37:42
Done.
|
| +follows: |
| + |
| +```bash |
| +pub global activate dart2js_info # only needed once |
| +dart2js_info_deferred_library_layout out.js.info.json |
| +``` |
| + |
| +The tool will output a table listing all of the deferred output units or chunks, |
| +for each unit it will list the set of libraries that contribute code to this |
| +unit. If a library contributes to more than one output unit, the tool lists |
| +which elements are on one or another output unit. For example, the output might |
|
Harry Terkelsen
2016/11/01 23:30:39
on -> in
Siggi Cherem (dart-lang)
2016/11/01 23:37:42
Done.
|
| +look like this: |
| + |
| +``` |
| +Output unit main: |
| + loaded by default |
| + contains: |
| + - hello_world.dart |
| + - dart:core |
| + ... |
| + |
| +Output unit 2: |
| + loaded by importing: [b] |
| + contains: |
| + - c.dart: |
| + - function d |
| + - b.dart |
| + |
| +Output unit 1: |
| + loaded by importing: [a] |
| + contains: |
| + - c.dart: |
| + - function c |
| + - a.dart |
| +``` |
| + |
| +In this example, all the code of `b.dart` after tree-shaking was included in the |
| +output unit 2, but `c.dart` was split between output unit 1 and output unit 2. |
| + |
| ### Function size analysis tool |
| This command-line tool presents how much each function contributes to the total |
| @@ -352,6 +397,7 @@ bugs at the [issue tracker][tracker]. |
| [lib_split]: https://github.com/dart-lang/dart2js_info/blob/master/bin/library_size_split.dart |
| [deferred_lib]: https://github.com/dart-lang/dart2js_info/blob/master/bin/deferred_library_check.dart |
| [deferred_size]: https://github.com/dart-lang/dart2js_info/blob/master/bin/deferred_library_size.dart |
| +[deferred_layout]: https://github.com/dart-lang/dart2js_info/blob/master/bin/deferred_library_layout.dart |
| [coverage]: https://github.com/dart-lang/dart2js_info/blob/master/bin/coverage_log_server.dart |
| [live]: https://github.com/dart-lang/dart2js_info/blob/master/bin/live_code_size_analysis.dart |
| [function_analysis]: https://github.com/dart-lang/dart2js_info/blob/master/bin/function_size_analysis.dart |