d5b87d32b0
Currently Ivy stores the element attributes into an array above the component def and passes it into the relevant instructions, however the problem is that upon minification the array will get a unique name which won't compress very well. These changes move the attributes array into the component def and pass in the index into the instructions instead. Before: ``` const _c0 = ['foo', 'bar']; SomeComp.ngComponentDef = defineComponent({ template: function() { element(0, 'div', _c0); } }); ``` After: ``` SomeComp.ngComponentDef = defineComponent({ consts: [['foo', 'bar']], template: function() { element(0, 'div', 0); } }); ``` A couple of cases that this PR doesn't handle: * Template references are still in a separate array. * i18n attributes are still in a separate array. PR Close #32798 |
||
---|---|---|
.. | ||
e2e_test/old | ||
src | ||
BUILD.bazel | ||
README.md | ||
benchmark_test.bzl | ||
start-server.js | ||
tsconfig-build.json | ||
tsconfig-e2e.json |
README.md
How to run the benchmarks locally
Run in the browser
yarn bazel run modules/benchmarks/src/tree/{name}:devserver
# e.g. "ng2" tree benchmark:
yarn bazel run modules/benchmarks/src/tree/ng2:devserver
Run e2e tests
# Run e2e tests of individual applications:
yarn bazel test modules/benchmarks/src/tree/ng2/...
# Run all e2e tests:
yarn bazel test modules/benchmarks/...
Use of *_aot.ts files
The *_aot.ts
files are used as entry-points within Google to run the benchmark
tests. These are still built as part of the corresponding ng_module
rule.