Comment by ankitchhatbar
2 days ago
Loading more than a few thousand rows on a web page will make unusably slow. Especially when you add a lot more features to it.
This is such that only what's seen or about to be seen is put on the page. The rest is kept ready on the server on local memory depending on what the user is doing.
This allows for a scalable solution that allows you to view thousands of records and interact with them
We can't view at thousands of records at the same time, that is why we have pagination, filters and sorting. Any library that can display 50 rows per page is good to go. The real work is on the backend.
1M rows in memory, with pagination or infiniscroll, is interesting only if we load that data and go offline, and all of filtering and sorting is up to the browser. I'd say that it's a niche use case. Furthermore 1M row x 1kB each is 1GB so we enter an order of magnitude ridden with troubles.
Here are some things that are already built that do what you are building:
https://github.com/bvaughn/react-virtualized https://github.com/bvaughn/react-window https://tanstack.com/virtual/latest
I know why you're doing it; I'm just not sure what I'm looking at. I'm not sure if this is supposed to be a product, but right now it's literally just a paginated HTML table?
> This is such that only what's seen or about to be seen is put on the page
This reads like it's a lazy loading library, but then the roadmap has features like
> Assign Items to Users
> Kanban View
> Collaborative Editing
Which read like something you'd have in a project management solution. How do these two concepts form a cohesive product and who is the target audience? I've seen my fair share of Jira and Trello hellscapes, but I doubt Kanban boards with more entries than memory can handle are very common.
I'm not so sure that loading "more than a few thousand rows" is as bad as it used to be.
I did some quick benchmarks a couple years back. It's been a while but I want to say that Chrome was drawing 10k rows of a decent size each (10 columns of real world data and about 500b/row iirc) in about 300ms on a 10 year old MBP.
I'll do a little benchmarking later today if I get a chance.
10 columns is pretty tame. Add in another 5 or 10 to introduce horizontal scrolling, add in some fixed position columns, html inputs like a checkbox in each row, apply styling or custom rendering to individual cells, and it can starts to show a little more quickly.