anmcgrath / BlazorDatasheet

Simple excel-like datasheet Blazor component
MIT License
208 stars 49 forks source link

Only render visible rows and cols #113

Closed anmcgrath closed 1 month ago

anmcgrath commented 1 month ago

Previously the render process consisted of looping through all rows and columns in the view-port. Any hidden rows or columns inside the view-port would have their height calculated and skipped if height was zero. Big sheets with lots of hidden rows were slow to render i.e #108.

This update skips these by storing visible row and column indices in the view-port. The renderer then only considers those in the render loop.