当前位置:网站首页>Native DOM vs. virtual DOM
Native DOM vs. virtual DOM
2022-06-26 01:09:00 【Nanchu】
- First , We need to figure out two concepts , What is primordial dom, What is virtual dom?
- Traditional development model
- Native JS or JS operation DOM when , The browser will build DOM The tree starts the process from the beginning to the end .
- In one operation , I need to update 10 individual DOM node , The browser receives the first DOM I didn't know there was 9 Update operations , So the process will be executed immediately , Final execution 10 Time .
- fictitious DOM
- Web The interface consists of DOM Trees ( Tree means data structure ) To build , When part of it changes , In fact, it corresponds to a DOM The node has changed .
- In one operation 10 Secondary update DOM The action of , fictitious DOM No immediate action DOM, It's about putting 10 Updated diff Save the content to a local JS In the object , In the end JS Object one time attch To DOM on the tree , Follow up , Avoid a lot of unnecessary calculations .
- fictitious DOM The benefits of
- use JS Object simulation DOM The benefits of nodes are , The update of the page can be reflected in JS object ( fictitious DOM) On , Operate... In memory JS Objects are obviously faster , After the update is completed , And finally JS Objects are mapped to real DOM, It's up to the browser to draw .
边栏推荐
猜你喜欢

数字电路——加法器

Redis之Strings命令

Vscode shortcut

FIFO code implemented in C language

Post ordered clue binary tree

Online gadget sharing (updated from time to time, current quantity: 2)

About the use of hc-12 radio frequency module

Msp430f5529lp official board (red) can not debug the problem

LabVIEW开发监控聚变实验脉冲电源

Redis的安装及启动
随机推荐
ASP.NET cache缓存的用法
Idea view unit test coverage
信息收集的利器,Google骇客语法
返回值为Object型方法调用equals()
Implementation notes of least square fitting conic in stm32
Music spectrum display toy -- implementation and application of FFT in stm32
Case: drawing Matplotlib dynamic graph
The maze of God's perspective in robot vision
卡通shader
《产品思维30讲》精华及感想
Binary sort tree
DGUS新升级:全面支持数字视频播放功能
开窍之问答
Classic interview questions: mouse drug test and Hamming code
ciscn_2019_en_2
Download and install flume
Preordered clue binary tree
在线小工具分享(不定时更新,当前数量:2)
What training brings happiness
FIFO code implemented in C language