-
Notifications
You must be signed in to change notification settings - Fork 27.1k
For loops in new control flow are extremely slow and taking much more memory than ngFor #52524
Copy link
Copy link
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)needs reproductionThis issue needs a reproduction in order for the team to investigate furtherThis issue needs a reproduction in order for the team to investigate further
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
I recently upgraded an Angular app to new control flow. All I did was:
- Run automatic migration
- Fix components where the migration didn't properly updated the code to the new syntax
On few components where we have large lists with infinite scroll, the app becomes very unresponsive as soon as we start loding more data to the list and list becomes large.
This was working perfectly with old ngFor syntax.
I have tried it with inline list as well as moving list to a seperate component with ChangeDetectionStrategy.OnPush.
Please provide a link to a minimal reproduction of the bug
For this I can add you to a private repo
Please provide the exception or error you saw
The app becomes unresponsive and starts consume more memory 4Gb-6Gb.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 17.0.0-rc.3
Node: 18.18.2
Package Manager: npm 9.8.1
OS: win32 x64
Angular: 17.0.0-rc.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.0-rc.3
@angular-devkit/build-angular 17.0.0-rc.3
@angular-devkit/core 17.0.0-rc.3
@angular-devkit/schematics 17.0.0-rc.3
@angular/cdk 17.0.0-rc.1
@angular/cli 17.0.0-rc.3
@angular/fire 16.0.0
@angular/google-maps 17.0.0-rc.1
@angular/material 17.0.0-rc.1
@angular/pwa 17.0.0-rc.3
@schematics/angular 17.0.0-rc.3
rxjs 7.8.1
typescript 5.2.2
zone.js 0.14.0
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: control flowIssues related to the built-in control flow (@if, @for, @switch)Issues related to the built-in control flow (@if, @for, @switch)needs reproductionThis issue needs a reproduction in order for the team to investigate furtherThis issue needs a reproduction in order for the team to investigate further