Shadow DOMs allow us to create independent DOM trees inside our documents that have their own node tree, (more or less) isolated style management, and, in a way, only get "rendered" into the parent DOM tree.
I am wondering about the performance implications at large scale. Is it good or bad to have many Shadow DOMs / Shadow roots on a page, as opposed to having everything in one large document?
On the one hand, I guess, browsers might benefit from smaller (sub-) DOM trees and the fewer style rules that they have to evaluate when they render the contents of an isolated Shadow DOM that contains only the nodes and the styles that are actually relevant for its content. This might have a positive impact on computation effort.
On the other hand, will the effort for the additional "document-like" metadata or the "merging" of the DOM trees at render time slow the browser down or significantly increase the memory usage?