When there is a change to an element in the DOM, the DOM has to re-render the element and all of the element’s children to the DOM - making DOM manipulation very slow in comparison to the Virtual DOM.
Actual DOM works on tree structure, which means if user interact with website and make any changes, it’ll update the entire DOM (tree structure), while virtual DOM is based on JavaScript object which compares present and previous versions of DOM and update only the specific nodes of the DOM, hence making it fast, optimized performance
One of the main causes of slow DOM manipulation is accessing the DOM too frequently or unnecessarily, as each time you use a method like document. getElementById, document. querySelector, or document. createElement, you are triggering a reflow or repaint.