Virutal Dom Patch

Source: Internet
Author: User

Today I think of an important improvement to virtual DOM: You can use higher-order functions to pre-evaluate diff and patch, which avoids running time to diff and patch the view, so performance is greatly optimized

Taiji Live 2014/12/14 9:32:43

It's like calculus.

Taiji Live 2014/12/14 9:33:46

The differential function is the first order function of the original function
9:35:49
Taiji Live 2014/12/14 9:35:49

View is the initial state continuous based on diff application Patch, that is, integral

Taiji Live 2014/12/14 9:36:49

The view function is restored by seeking the differential and then integrating the first.

Taiji Live 2014/12/14 9:37:20

Identities
9:44:00
Inch log
2014/12/14 9:44:00

It's so, I don't know how it's going to happen
9:46:30
Taiji Live 2014/12/14 9:46:30

First let the view function be slightly

Taiji Live 2014/12/14 9:47:14

such as constant function, linear function

Taiji Live 2014/12/14 9:48:14

The differential of the combined function of these functions is then asked
9:48:48
Taiji Live 2014/12/14 9:48:48

Like If,for,repeat.

Taiji Live 2014/12/14 9:50:34

If you can't pre-evaluate it, you're fallback to the way it is.
9:51:22
Taiji Live 2014/12/14 9:51:22

You can also leverage the caching mechanism

Taiji Live 2014/12/14 9:53:06

The differential of the constant function is 0, and the patch is the empty operation
9:55:31
Taiji Live 2014/12/14 9:55:31

{{x}} is equivalent to a linear function, the patch is to add the difference, the actual operation with the new value update is possible
9:57:14
Taiji Live 2014/12/14 9:57:14

If the test value is not changed, the patch is empty, otherwise the existing branch is replaced with another branch

Taiji Live 2014/12/14 9:58:40

Repeat is based on the model value of the increase and deletion

11:01:51
Sune
2014/12/14 11:01:51

Taiji Real

Virutal Dom Patch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.