logoalt Hacker News

tipiirai04/01/20253 repliesview on HN

This exact demo will crash with vanilla JavaScript (in Chrome 134.0). This React would also crash — unless the computation relies on WASM


Replies

mirzap04/01/2025

Make a demo with react-virtualized[0] and see if it crashes. Hint: It will not[1]. React can easily render 1 million rows with high performance without relying on WASM [2]

Here is the demo of react-virtualized[3], in which I entered 10m as the row count and scrolled to the bottom without crashing.

[0] https://github.com/bvaughn/react-virtualized

[1] https://www.youtube.com/watch?v=1JoEuJQIJbs

[2] https://medium.com/@priyankadaida/how-to-render-a-million-ro...

[3] https://bvaughn.github.io/react-virtualized/#/components/Lis...

*Update: Here I made a table with 1 million rows with search, filtering, and pagination. In plain Javascript:

https://htmlpreview.github.io/?https://gist.githubuserconten...

Farseer_04/01/2025

Could you give a code example? Also, by crash, do you mean the mentioned stack overflow error?

If so, why would the stack be involved when talking element count?

show 2 replies
wordofx04/01/2025

No. Back when supporting ie 9 we had tables with a million rows and dozens of columns and it runs fine.