3 ms·
I was playing with using timeouts and request animation frame, along with storing certain internal objects in Maps vs Objects. All I meant was that the time th
by ryansolid 8y ago
I was playing with using timeouts and request animation frame, along with storing certain internal objects in Maps vs Objects.
All I meant was that the time the browser spends on rendering/layout/GC trumps an implementation code consideration. Optimized handwritten JS has the issue before even considering libraries. People attempt to come up with smarter solutions rather than actually just rendering a million rows. Playing with timeouts and asynchronous rendering the view in parts is an approach. Windowing is another, by which I mean setting a viewport essentially(ie only render what's in view). But currently these sit in userland since there are tradeoffs.
I've seen libraries try to offload to WebWorkers but every attempt I've seen so far in that vein is slower than just optimal main thread code. I know the WASM crowd is looking into that.
Also things like Time Slicing in React Fiber are trying to bring this to the library level. And Solid's primitives can be used to similar effect but these approaches aren't generalized yet. It's one of the areas I see Solid's model having an advantage.
- alok-g 8y agoThis is helpful for me to follow the details. Thanks!