diprokon / ng-table-virtual-scroll

Virtual Scroll for Angular Material Table
https://diprokon.github.io/ng-table-virtual-scroll
MIT License
134 stars 42 forks source link

Remove duplicate observers to improve performance #63

Closed JoeyLi-1 closed 3 years ago

JoeyLi-1 commented 3 years ago

Hi diprokon,

Your project helps us a lot. Recently, we create a big and very complex table, but encounter performance issue when you scroll up and down.

Then I print some log and find that there are two identical observers. And they will send two same notification when renderData changed.

Remove one of them could help to improve performance.

Please review the PR. Let me know if you have better solution. Thank you!

diprokon commented 3 years ago

Hi @JoeyLi-1 ! Thanks for your effort!

I checked those observers - I can't see any issue. Maybe the problem can be reproduced only with complex setup. Can you provide some stackblitz example where I can see your setup and those observers?

JoeyLi-1 commented 3 years ago

Hi @diprokon ,

Yep, I will try to create a project so that you could debug. Hopefully I could finish it in one week or two. Will give you update later.

JoeyLi-1 commented 3 years ago

Hi @diprokon ,

Sorry, it took so long to reply. I could not reproduce the duplicate observers issue. And we create a separated repo to mimic what we did in our project. Please refer screen recording here: https://github.com/diprokon/ng-table-virtual-scroll/issues/60 .

I will close this PR now.