Dwarves
Memo
Memo
0) { selectedRecent = recentPages[0]; selectedSection = 'recents'; }">
Reading Mode
+shift+f
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
Subscribe to Dwarves Memo
Receive the latest updates directly to your inbox.

Loading...