Poor performance with > 100 appointments in view
valincius opened this issue · 3 comments
valincius commented
When displaying many appointments, the performance degrades pretty quickly
- Optimize which components should be redrawn
- Optimize logic to only perform calculations on the days/appointments that are being affected
- Only iterate appointments once instead of once per each week in the month ?
valincius commented
Add @key
to anywhere we're building components from a list
cptcrunchy commented
You should use Virtualize for a list of components. https://docs.microsoft.com/en-us/aspnet/core/blazor/components/virtualization?view=aspnetcore-5.0
valincius commented
Thanks for the suggestion @cptcrunchy but I'm not sure that'll be helpful in this case, that just unloads any components that aren't visible on the screen, I've already got a sort of method in place to make sure we're not loading/building appointments that aren't visible/in the current range/span. The performance drop occurs when we're rendering 100s of components on the screen that NEED to be rendered.