Hacker News new | ask | show | jobs
by coldtea 1011 days ago
The DOM is plenty fast.

Most web apps use it for what it wasn't meant to do, in an inefficient matter, with useless rerenders and overhead.

2 comments

Let me clarify: the DOM is fast _at what it does_. But in order to truly serve things like web apps rather than documents it needs to have primitives like list virtualization. It doesn't, so people end up using needlessly complex JavaScript frameworks that drag down performance.
> But in order to truly serve things like web apps rather than documents it needs to have primitives like list virtualization.

Why not create a UI system, like X Window over the web (I know X can be done over the network) specifically for web apps? Solve the issue at the root and leave the DOM to documents.

Or just use htmx.org
This! Call it once with a string containing 457 elements and the DOM is blazing fast. Call it 457 times to create an element and the DOM is slow.