
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
Benchmark Directory Layout
Bazel
Under bazel the rules for laying out test files are slightly different. Use largetable/render3
as an example.
Put the perf file in current subdirectory (ie largetable
) such that the same perf file can be used for each of the sub-subdirectories. (ie largetable/*
should all be testable with the same perf file largetable/largetable_perf.spec.ts
). Under bazel, typescript protractor spec files must end with .spec.ts
or .test.ts
.