Re: [whatwg/dom] Declarative Shadow DOM (#831)

Thanks for posting @thescientist13! I think the real desire here, though, is to get real-world **production** site performance data, showing an optimized site in the wild. It is [relatively easy](https://github.com/mfreed7/declarative-shadow-dom/blob/master/perf_tests/clock_example/results.md) to gin up example sites that either make things look good or bad, but the question is whether there's a real world performance benefit (or penalty) for using DSD, **when used in production**. But seriously, thank you for posting, and for supporting this feature, I appreciate it.

> Some examples focusing on the performance of light DOM vs declarative Shadow DOM would be good. It is known that declarative Shadow DOM is quite a bit slower in cases one needs to create lots of elements. (I think the slowness comes from the implicit adopt(), but I haven't profiled blink)

@smaug---- I think it would be good to clarify that the thing that is slower is **shadow DOM**, not **declarative** shadow DOM. I.e. adding 10 `<div>`'s to a page is significantly faster than adding 10 `<div>#shadowroot{}</div>`'s to that page, regardless of how you get the `#shadowroot` in there. Further, using declarative Shadow DOM to add the `#shadowroot` **[is faster](https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md#results)** than adding it via `attachShadow()`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/831#issuecomment-993902543

Received on Tuesday, 14 December 2021 19:22:20 UTC