Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could "block virtual dom" benefit LWC? #3565

Open
AllanOricil opened this issue Jun 10, 2023 · 2 comments
Open

Could "block virtual dom" benefit LWC? #3565

AllanOricil opened this issue Jun 10, 2023 · 2 comments

Comments

@AllanOricil
Copy link
Contributor

https://million.dev/blog/virtual-dom

@AllanOricil
Copy link
Contributor Author

I forgot lwc uses shadow dom

@AllanOricil AllanOricil closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2023
@nolanlawson
Copy link
Collaborator

I have not looked deeply into MillionJS, but I think there are two optimizations here that LWC could take advantage of:

  1. Static analysis – we already do this (perf: special handling for static elements #2781). See also Vue static hoisting and Marko static subtrees.
  2. Dirty checking – AFAICT this is a kind of fine-grained reactivity, i.e. diff the state and then only update subtrees that have changed, not the entire component. We could potentially do this with some kind of compile-time analysis.

In any case, this is worth looking into more deeply, so I'll leave this issue open for now. Thanks for opening!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants