3 ms·
DOM manipulation is slow is pretty much busted misconception today: https://svelte.dev/blog/virtual-dom-is-pure-overhead https://svelte.dev/blog/virtual-dom-is
by miohtama 5y ago
DOM manipulation is slow is pretty much busted misconception today:
https://svelte.dev/blog/virtual-dom-is-pure-overhead https://svelte.dev/blog/virtual-dom-is-pure-overhead
- flohofwoe 5y agoIt is "slow" relative to the overhead of calling from WASM into JS to manipulate the DOM from JS. To be fair, I don't know how many clock cycles creating, destroying or modifying a DOM node costs on average, but most likely "a lot" compared to the overhead of a WASM to JS call because a lot more machinery is involved.
- miohtama 5y agoYou are correct, today. But the overhead from WASM to JS is disappering with host binding, also known as WebAssembly Interface Types proposal. https://www.chromestatus.com/feature/6219189974990848 https://www.chromestatus.com/feature/6219189974990848