angular-cn/packages/compiler
crisbeto d5b87d32b0 perf(ivy): move attributes array into component def (#32798)
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
2019-10-09 13:16:55 -07:00
..
design build: update to rules_nodejs 0.38 (#32889) 2019-10-08 09:27:11 -07:00
src perf(ivy): move attributes array into component def (#32798) 2019-10-09 13:16:55 -07:00
test refactor(compiler): move test helper to test file (#32937) 2019-10-03 12:12:55 -07:00
testing build: remove unreferenced tsconfig-build.json files (#30858) 2019-06-05 09:03:36 -07:00
BUILD.bazel build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
compiler.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
index.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
package.json fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734) 2018-10-31 14:15:06 -04:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00