当前位置:网站首页>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 .
边栏推荐
- Chapter V exercises (124, 678, 15, 19, 22) [microcomputer principles] [exercises]
- Nacos registry
- Simple deepclone
- Nacos注册中心
- Template engine - FreeMarker first experience
- [从零开始学习FPGA编程-44]:视野篇 - 集成电路助力数字化时代高质量发展-1-集成电路芯片主要形态
- 同花顺软件买股票进行交易安全吗?怎么开户买股票
- Redis的安装及启动
- Case: drawing Matplotlib dynamic graph
- Typescript for Web Learning
猜你喜欢
随机推荐
Electronic training.
Flex & Bison 开始
mysql错误代码2003的解决办法
Digital circuit - adder
C thread pool control semaphore
Msp430f5529lp official board (red) can not debug the problem
Android cache usage tool class
马斯克 VS 乔布斯,谁是21世纪最伟大的创业家
jarvisoj_ level2_ x64
Spark log analysis
C another new class is ICO? And app Use of config
使用Gin框架运行Demo时报错“ listen tcp :8080: bind: An attempt was made to access a socket in a way forbidden”
Sqlserver is case sensitive
213. house raiding II
Preordered clue binary tree
Sword finger offer II 096 String interleaving
案例:绘制Matplotlib动态图
从查询数据库性能优化谈到redis缓存-谈一谈缓存的穿透、雪崩、击穿
ETCD数据库源码分析——集群间网络层服务端接口
ADC acquisition noise and comparison between RMS filter and Kalman filter

![Final review [machine learning]](/img/63/d617a95592b1499cff0161bd5c3e9e.png)

![Chapter V exercises (124, 678, 15, 19, 22) [microcomputer principles] [exercises]](/img/16/d67f38d32af6904a7d0be9f2e5be70.png)




