Repository: angular
Issue: Improve form initialization performance by removing template-driven code from reactive form directives
Labels: area: forms

### Which @angular/* package(s) are relevant/related to the feature request?

_No response_

### Description

As of today, every instantiation of a reactive form directive triggers a call to the corresponding `AbstractControl.updateValueAndValidity()`. A few stacktraces to show where this happens:
1. `[formControl]`:
    * [form_control_directive.ts:128](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_control_directive.ts#L128)
2. `[formControlName]`:
    * [form_control_name.ts:145](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_control_name.ts#L145)
    * [form_control_name.ts:206](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_control_name.ts#L206)
    * [form_group_directive.ts:170](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_group_directive.ts#L170)
3. `[formGroupName]`:
    * [form_group_name.ts:74](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_group_name.ts#L74)
    * [abstract_form_group_directive.ts:40](https://github.com/angular/angular/blob/main/packages/forms/src/directives/abstract_form_group_directive.ts#L40)
    * [form_group_directive.ts:202](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_group_directive.ts#L202)
    * [form_group_directive.ts:332](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_group_directive.ts#L332)

These `AbstractControl.updateValueAndValidity()` calls mean that every time a new `[formControl]`/`[formControlName]`/`[formGroupName]`/`[formArrayName]` directive is instantiated in the template, a significant part of the form tree has to reduce value again, and rerun validation checks.

## Performance implications

If we consider an example of a `FormArray` with `N` `FormControl`s inside, and some non-trivial validation at the `FormArray` level ([demo](https://stackblitz.com/edit/angular-cz2rek?file=src%2Fapp%2Fapp.component.html)), then we'll quickly see that this is a significant amount of work. More specifically, just displaying this form causes:
* the `FormArray` to allocate an array of size `N` (for storing value), `N` times.
* the `FormArray`-level validator to be rerun `N` times

Moreover, all of this work appears unnecessary, because:
* the form being rendered (or not) should have no impact on the form state (stored in the tree of `AbstractControl`s),
* we are rerunning all of these validation checks with the exact same form value, getting the same results, every time.

## So why do we have it?

It seems that these calls are remnants of the days when the template-driven and reactive forms frameworks were a single thing. I can imagine that these may be needed to:
* support the [`ngModel` on reactive form directives](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_control_directive.ts#L79-L103)
* [support the setting of template-driven validators through reactive form directives](https://github.com/angular/angular/blob/main/packages/forms/src/directives/reactive_directives/form_control_directive.ts#L115-L116)

Using these features is a terrible idea, and they have been deprecated for at least 5 years now (https://github.com/angular/angular/issues/12708, https://github.com/angular/angular/pull/22633, https://github.com/angular/angular/pull/28996).



### Proposed solution

Can we please remove the leftovers of these legacy features, and get the performance benefits?

### Alternatives considered

N/A