Neko Neko2
Type ESC to close search bar

Why DOM manipulation is slow?

Actually, the DOM is not slow. Adding or removing a DOM node is not much more than setting a property on the JS object. However, layout is slow. Imagine adding a DOM node changes the height of the document, it would invoke a bunch of rendering processes to redraw the screen. And all the complex algorithms behind the those processes makes any changes in DOM potentially expensive.


Mentioned in

No mentions found

Unable to load mentions

Subscribe to Dwarves Memo

Receive the latest updates directly to your inbox.

Why DOM manipulation is slow?
thanh
Mint this entry as an NFT to add it to your collection.
Loading...