perf(ivy): chain multiple property instructions (#31078)
Currently each property binding generates an instruction like this: ``` property('prop1', ctx.value1); property('prop2', ctx.value2); ``` The problem is that we're repeating the call to `property` for each of the properties. Since the `property` instruction returns itself, we can chain all of the calls which is more compact and it looks like this: ``` property('prop1', ctx.value1)('prop2', ctx.value2); ``` These changes implement the chaining behavior for regular property bindings and for synthetic ones, however interpolated ones are still handled like before, because they use a separate instruction. This PR resolves FW-1389. PR Close #31078
This commit is contained in:
@ -154,8 +154,7 @@ describe('r3_view_compiler', () => {
|
||||
$i0$.ɵɵelement(0, "div");
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵɵproperty("@attr", …);
|
||||
$i0$.ɵɵproperty("@binding", …);
|
||||
$i0$.ɵɵproperty("@attr", …)("@binding", …);
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
|
Reference in New Issue
Block a user