3 ms·
It's considerably more complex than that. There's just a lot of stuff that gets compiled and rendered. No single part takes more than a few milliseconds, so I
by Waterluvian 5y ago
It's considerably more complex than that. There's just a lot of stuff that gets compiled and rendered. No single part takes more than a few milliseconds, so I can bin it across many tasks.
Picture a canvas that I'm calculating then drawing tens of thousands of elements to before displaying it. Very binnable. Very hard to get right to a point that you can't "feel" the lag when working with the rest of the app.
I also explored web workers but it's currently more hassle than I want to be bothered with.
- pier25 5y agoIf your use case requires rendering and updating thousands of components, maybe React wasn't a good fit? You could try switching to Preact which has better performance and should be painless. https://krausest.github.io/js-framework-benchmark/current.html https://krausest.github.io/js-framework-benchmark/current.ht...
- Waterluvian 5y agoNot components. Elements that compile to a canvas. Think tens of thousands of points, lines, polygons, all drawn as vector or raster images. Ie. compiling a deeply rich interactive map of data. I appreciate the advice but I didn't provide sufficient information for informed responses. It was just a general comment about why I'm excited for React 18 to help better manage concurrency in a number of ways. Suspense will also be nice because I can eliminate a lot of my own "loading screen" logic.
- pier25 5y ago> Not components. Elements that compile to a canvas. Ah right. I thought the canvas example was just an example. Still, a faster framework would be better for high performance use case, no?