React Virtual DOM is SLOW, try Million.js

Andreas Sujono
5 min readJun 5, 2023

Virtual DOM is an important feature in React that enables reactivity, but at the same time, it can be a performance bottleneck. The MillionJs library helps to mitigate this and can boost React performance by up to 70%.

One thing we must realize is that React is popular not because it’s fast. I discussed this in detail in my previous article, so make sure you check it out first. The number one factor that causes slow performance issues in React is the virtual DOM bottleneck. That’s why the community has started building a lot of React extension frameworks/libraries, such as Preact and SolidJs, that have different approaches to optimize rendering.

However, these frameworks require additional knowledge, code migration, and have some feature limitations. They also have smaller communities compared to React.

How Virtual DOM works?

React utilizes a Virtual DOM (Document Object Model) as an in-memory representation of the actual DOM. The Virtual DOM serves as a lightweight copy of the real DOM, consisting of a hierarchical tree structure of HTML elements, and is used for efficient updates of the actual DOM.

Whenever a component’s state or props change, React generates a new Virtual DOM representation of the component’s user interface (UI). This fresh Virtual DOM…

--

--

Andreas Sujono
Andreas Sujono

Written by Andreas Sujono

A Full Stack Developer with 5 years of working experience, Web2 and Web3 Enthusiast, twitter: @AndreasSujono2

No responses yet