Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Performance issue #626

Open
AdnanInayat opened this issue Oct 10, 2017 · 2 comments
Open

Performance issue #626

AdnanInayat opened this issue Oct 10, 2017 · 2 comments

Comments

@AdnanInayat
Copy link

I used md data table with all fields editable. In my table all all column have editable fields.
There are around 700 rows(paginated) and in each row, 3 columns have dropdowns with almost 100-200 options in those dropdowns. Others are simple input fields.

Problem is when I try to go to next page it just halt the browser and eventually, browser throws error to either kill or wait more for the action to be completed.

Can anyone help me here???

@samal-rasmussen
Copy link

md-virtual-repeat should help a lot:
https://material.angularjs.org/latest/demo/virtualRepeat
https://material.angularjs.org/latest/api/directive/mdVirtualRepeat

It will make sure that you are only actually rendering what in visible in the table.

Other than that you can try to make each cell show a read only value until the user clicks the cell. Then you'll enable the read/write component for that cell until the user presses enter/tab/escape or clicks somewhere else. This way you aren't showing complex components in each row all the time, but rater just simple interpolated text or number strings. This should be much lighter.

@AdnanInayat
Copy link
Author

Thank you @samal84 I will try it when and let you know. I think virtual repeat will resolve the issue.
I will try to combine both solutions you told me. Thank you again 👍

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

No branches or pull requests

2 participants