Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak causing UI lag #102

Open
NogaMan opened this issue Jul 22, 2021 · 2 comments
Open

Memory leak causing UI lag #102

NogaMan opened this issue Jul 22, 2021 · 2 comments

Comments

@NogaMan
Copy link

NogaMan commented Jul 22, 2021

TL; DR

For a default CD cycle, when routerLink is not a string, but a computed array, the ngOnChange triggers each cycle and pushes new tree into registry, creating major UI lag

Steps to reproduce

  • Add routerLink with computed getter value
  • Set breakpoint at this.trees.push(tree); in PrefetchRegistry here
  • The array keeps growing cyclically

Codesandbox example

The issue can only be reproduced with routerLink value as a getter. If using path arrays hard-coded into template, the problem does not appear.

Images

Screenshot 2021-07-22 at 17 21 07

@NogaMan NogaMan changed the title trees array exploding in PrefetchRegistry Ui lag due to trees array exploding in PrefetchRegistry Jul 22, 2021
@NogaMan
Copy link
Author

NogaMan commented Nov 1, 2021

Looks like this issue is a pretty old one #28

Is there any plans to fix it?

@NogaMan NogaMan changed the title Ui lag due to trees array exploding in PrefetchRegistry Memory leak causing Ui lag Nov 1, 2021
@NogaMan NogaMan changed the title Memory leak causing Ui lag Memory leak causing UI lag Nov 1, 2021
@NogaMan
Copy link
Author

NogaMan commented Mar 12, 2024

@mgechev hi! it would be great to see the attached PR reviewed and maybe merged. Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant