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

P-Tree component renders tree too slow in version 17 #14762

Closed
Lautern opened this issue Feb 8, 2024 · 2 comments
Closed

P-Tree component renders tree too slow in version 17 #14762

Lautern opened this issue Feb 8, 2024 · 2 comments

Comments

@Lautern
Copy link

Lautern commented Feb 8, 2024

Describe the bug

P-Tree component renders tree too slow in version 17 on expand when there are more than 1000 children.
In version 14 it worked perfectly fine: https://stackblitz.com/edit/primeng-tree-demo-4jcspp?file=src%2Fapp%2Fapp.component.ts
In version 17 slow behavior as described above: https://stackblitz.com/edit/hjxyqy?file=src%2Fapp%2Fdemo%2Ftree-basic-demo.ts

Environment

angular 17.0.5
primeng 17.6.0
node 20.0.9

Reproducer

https://stackblitz.com/edit/hjxyqy?file=src%2Fapp%2Fdemo%2Ftree-basic-demo.ts

Angular version

17.0.5

PrimeNG version

17.6.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.0.9

Browser(s)

Chrome, Firefox

Steps to reproduce the behavior

See stackblitz links. Click on expand for Documents and observe how slow children are rendered and the whole browser freezes

Expected behavior

children should be rendered faster (as in version 14)

@Lautern Lautern added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 8, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 8, 2024
@MaximSt85
Copy link

To mention, in the case of Primeng 17 in the example there are 900 items, and in the example with Primeng 14 there are 2000 items. And in example with primeng 14 it expands much faster than in example with primeng 17.

@cetincakiroglu cetincakiroglu modified the milestones: 17.7.0, 17.8.0 Feb 12, 2024
@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Feb 23, 2024

Hi,

v14 also load slow as I see in your example, to handle large amount of data please use virtualScroll feature to load items. Here is a basic implementation. https://stackblitz.com/edit/tzszub?file=src%2Fapp%2Fdemo%2Ftree-basic-demo.html,src%2Fapp%2Fdemo%2Ftree-basic-demo.ts

Closing the issue since it can be solved by enabling virtualScroll.

@cetincakiroglu cetincakiroglu removed the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 23, 2024
@cetincakiroglu cetincakiroglu removed this from the 17.8.0 milestone Feb 23, 2024
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

4 participants