angular/packages/compiler/src/render3
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
..
view perf(ivy): move attributes array into component def (#32798) 2019-10-09 13:16:55 -07:00
r3_ast.ts feat(ivy): include value spans for attributes, variables and references (#30181) 2019-07-25 16:36:32 -07:00
r3_factory.ts refactor(ivy): generate ngFactoryDef for injectables (#32433) 2019-10-02 13:04:26 -07:00
r3_identifiers.ts refactor(ivy): remove styling state storage and introduce direct style writing (#32591) 2019-09-16 14:12:48 -07:00
r3_jit.ts refactor(compiler): wrap the jit evaluation in an injectable class (#28055) 2019-02-12 20:58:27 -08:00
r3_module_compiler.ts refactor(ivy): move directive, component and pipe factories to ngFactoryFn (#31953) 2019-08-27 13:57:00 -07:00
r3_module_factory_compiler.ts feat(ivy): add an IVY local the compiler which avoids analyzeModule (#23441) 2018-04-19 16:32:09 -07:00
r3_pipe_compiler.ts refactor(ivy): generate ngFactoryDef for injectables (#32433) 2019-10-02 13:04:26 -07:00
r3_template_transform.ts fix(ivy): avoid unnecessary i18n instructions generation for <ng-template> with structural directives (#32623) 2019-09-13 10:01:55 -07:00
r3_types.ts refactor(ivy): remove the backpatch compiler (#23441) 2018-04-19 16:32:09 -07:00
util.ts fix(ivy): ensure @animation host bindings/listeners work properly (#27896) 2019-01-04 14:12:29 -08:00