forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(ivy): initialise inputs from static attrs on the first template …
…pass only (angular#33195) This change assures that data structures related to initial inputs (ones set from static attributes) are created only once (during the first template pass) and no additional runtime checks are done for subsequent passes. Additionally this commit changes the data structure used by initial inputs on TNode - previously initial inputs for a directive were stored at the directive index in LView. This meant that an array holding initial inputs was relativelly big and had many null elements (as placeholders for elements, directives, injector etc.). After the change we only create an array of a size equal to a number of directives matched on a given TNode. For the `directive_instantiate` benchmark it boils to allocating a 1-element array vs. 100-element array previously. PR Close angular#33195
- Loading branch information
1 parent
21c1e14
commit aef7dca
Showing
1 changed file
with
21 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters