Skip to content

Commit c994267

Browse files
crisbetokirjs
authored andcommitted
refactor: add mark for signal forms
Adds a mark for signal forms so we can track adoption. Also moves the call for `@let` into `declareLet` since we don't need it to fire as often as in `storeLet`.
1 parent 3b1fa82 commit c994267

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/core/src/render3/instructions/control.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88
import {RuntimeError, RuntimeErrorCode} from '../../errors';
9+
import {performanceMarkFeature} from '../../util/performance';
910
import {getClosureSafeProperty} from '../../util/property';
1011
import {assertFirstCreatePass} from '../assert';
1112
import {bindingUpdated} from '../bindings';
@@ -54,10 +55,13 @@ export function ɵɵcontrolCreate(): void {
5455
}
5556

5657
const control = getControlDirective(tNode, lView);
58+
5759
if (!control) {
5860
return;
5961
}
6062

63+
performanceMarkFeature('NgSignalForms');
64+
6165
if (tNode.flags & TNodeFlags.isFormValueControl) {
6266
listenToCustomControl(lView, tNode, control, 'value');
6367
} else if (tNode.flags & TNodeFlags.isFormCheckboxControl) {

packages/core/src/render3/instructions/let_declaration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const UNINITIALIZED_LET = {};
2525
* @codeGenApi
2626
*/
2727
export function ɵɵdeclareLet(index: number): typeof ɵɵdeclareLet {
28+
performanceMarkFeature('NgLet');
2829
const tView = getTView();
2930
const lView = getLView();
3031
const adjustedIndex = index + HEADER_OFFSET;
@@ -41,7 +42,6 @@ export function ɵɵdeclareLet(index: number): typeof ɵɵdeclareLet {
4142
* @codeGenApi
4243
*/
4344
export function ɵɵstoreLet<T>(value: T): T {
44-
performanceMarkFeature('NgLet');
4545
const tView = getTView();
4646
const lView = getLView();
4747
const index = getSelectedIndex();

0 commit comments

Comments
 (0)