Re:Asm-dom, a minimal WebAssembly virtual DOM to build C++ SPA
by tannhaeuser on Monday March 16, 2020 @06:17AM
(#22591423)
My understanding is that's CSS reflows what makes DOM operations expensive (plus maybe re-building redundant/cached DOM structures such as document.links and informing event listeners), rather than trivial tree insertions. You could also batch multiple DOM updates by just constructing an off-screen DOM element hierarchy and then finally attach it to the live DOM, replacing anything below a given node in a single atomic operation. AFAICS, DOM diffing really only adds value if you have DOM updates from many sources/components to merge for very complex React-like apps. Happy to be corrected by actual performance figures/experts.
[ Parent
| on HN ]
Re:Asm-dom, a minimal WebAssembly virtual DOM to build C++ SPA
by The_rationalist on Monday March 16, 2020 @11:12AM
(#22593379)
My understanding is that's CSS reflows what makes DOM operations expensive
This is why CSS contain property is such a big performance revolution.
There is also if I remember well, a special kind of Dom that is only for logic, therefore being unaffected to reflows. I don't remember how it's called.
Re:Asm-dom, a minimal WebAssembly virtual DOM to build C++ SPA
by lootsauce on Monday March 16, 2020 @05:05PM
(#22597780)
I believe you are speaking of a fragment. https://developer.mozilla.org/en-US/docs/Web/API/DocumentFra...