3 ms·
> In theory, a compiled, static template approach should be faster than V-DOM Maybe faster in basic microbenchmarks. As soon as you start optimizing UI library
by localvoid 8y ago
> In theory, a compiled, static template approach should be faster than V-DOM
Maybe faster in basic microbenchmarks. As soon as you start optimizing UI library for complex applications, there are many other optimization goals you should focus on, like the size of the generated code per component type, the amount of different code paths(increase probability that executed code is JITed), etc.
Virtual DOM solves many issues, it is not just diffing, it is also a lightweight component model, possibility to add lightweight synthetic events, single code path for creating/updating/destroying DOM nodes, the simplest algo that handles complex tree transformations, etc.