After looking at a lot of virtual dom trees on the Internet, they are updated to dom.
I think dom operation is the key to performance optimization.
For example, if I change the content of a row in the table, I will definitely find a way to directly change this row or even a td instead of replacing the entire table. Can vue, react be faster than this?
Also react will have many update state operations, put them into queue inside, and update dom in the last block. In that case, will it be very hard to update data at a certain time when there is a large amount of data?
No one answered the question … then I threw a brick
Pre-advice can directly look at this problemIt is said on the Internet that it is slow to operate the real DOM, but the test results are faster than React. WhyThe next big answer (of course, you can also look at other people’s).
React did mention in blog inside that it is faster than the original, but there are certain conditions. Not all operations are fast. For example, a straight point of view is like a canteen. In the case of a person playing rice, Aunt React can open the door to the person and let him play directly in The Kitchen. The result of playing directly in The Kitchen (DOM of the original operation) is the same. But the canteen inside suddenly came with 1,800 people, including strong men, women and children, and those in Algebraic Average who gave cash directly, so the unified queuing and swiping of cards one by one would be more efficient than crowding into The Kitchen. This is actually an engineering design.