You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could detect static vNode trees during compilation time ( JSX ).
Some idea how this could work:
When static shape is detected. See infernojs/babel-plugin-inferno#54
We hoist the given vNode tree and flag it as Static.
Now during patch algorithm, when two identical vNodes are diffed we check if the shape has been marked as static we just return. This static flag could be used also to mount faster. For example when static vNode has been flagged and this vNode comes to mount routine, we check if it already contains dom, now if it returns a dom, we clone the vNode using directClone or deepClone and clone the actual DOM tree using dom.cloneNode(true). This way the whole tree can be created much faster.
This algorithm will not improve the performance for everybody, because there is usually a lot dynamic information in real single page applications, but it will benefit some apps.
The text was updated successfully, but these errors were encountered:
We could detect static vNode trees during compilation time ( JSX ).
Some idea how this could work:
When static shape is detected. See infernojs/babel-plugin-inferno#54
We hoist the given vNode tree and flag it as Static.
Now during patch algorithm, when two identical vNodes are diffed we check if the shape has been marked as static we just return. This static flag could be used also to mount faster. For example when static vNode has been flagged and this vNode comes to mount routine, we check if it already contains
dom
, now if it returns a dom, we clone the vNode using directClone or deepClone and clone the actual DOM tree usingdom.cloneNode(true)
. This way the whole tree can be created much faster.This algorithm will not improve the performance for everybody, because there is usually a lot dynamic information in real single page applications, but it will benefit some apps.
The text was updated successfully, but these errors were encountered: