Consider a "component" methodology
Many backends can optimize their virtual-dom search tree if they know that "everything under a node" won't change unless its props change. This is the concept of a "component" like in react (but disregarding its concept of state).
If a DOM tree is really deep, then the
patch function (no matter the backend) will have to traverse the entire tree in order to determine if any of its nodes differ in their props, and determine how to best handle that change. But, if we know in-advance that everything under a certain node is A-OK because the parent's props haven't changed, then it will save us a boat-load more time traversing our DOM tree.
Petit-DOM and React.js both have functions for this, but Snabbdom doesn't. Likewise, we could build-in functionality to support this in ParDiff, but it's not yet clear how best to handle the design. In any scenario, though, it should probably look something like an instance in
Backend, where the
component function has a default implementation of