imba Why so fast?

This column is not thinking thoughtful.
imba document

Listed below are the author's comment vue on the virtual dom:

When comparing performance, to make it clear initial rendering, a small amount of data updates, a lot of data to update these different occasions. Virtual DOM, dirty check MVVM, MVVM data collected on different occasions have different performance and different optimization requirements. Virtual DOM order to improve performance of a small amount of data updates need targeted optimization, such shouldComponentUpdate or immutable data.
Initial rendering: Virtual DOM> Check dirty> = dependency collected

A small amount of data update: dependent on the collection >> Virtual DOM + optimization> dirty check (not optimized)> Virtual DOM no optimization

Large amounts of data update: dirty checking + optimization> = + dependent collect optimization> Virtual DOM (can not / do not need optimization) >> MVVM no optimization

Do not so naive as to think that Virtual DOM is fast, diff is not free, batching MVVM can do it, and when the final patch is not to use the native API. Virtual DOM real value in my opinion is never a performance, but it is 1) as a function of type of UI programmatically opened the door; 2) can be rendered to the backend than the DOM, such as ReactNative.

Author: especially the rain the river link: www.zhihu.com/question/31... Source: know almost all of the copyright. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

imba are so fast, that is dependent on the collection + real dom operation, each modification can exact on dom operation, that is, wherever.

Reproduced in: https: //juejin.im/post/5d079a10e51d4577770e7389

Guess you like

Origin blog.csdn.net/weixin_34384915/article/details/93175431