Re: [w3c/webcomponents] Measuring performance of shadow DOM (#848)

> I think it would help if you made the problem statement a bit more precise.

The problem is that the encapsulation principles prevent leaking information about nodes inside a shadow tree, but there are many cases where web applications encapsulate their whole webpage. Therefore, it's not possible to measure element-specific performance of those websites. In particular I'm thinking about ElementTiming or LargestContentfulPaint, but as the issue was closed I guess this issue is supposed to cover potentially other affected APIs.

> There were also various suggestions in the mentioned thread that you are not addressing here and it's unclear why they are not sufficient (in particular using `ElementInternals` or some kind of explicit piercing).

I'm not looking to address ideas as sufficient/insufficient because ultimately what I want is consensus on a solution. I'm happy to send a PR once people on the bug agree on the solution, but such agreement does not seem to have been reached. And sure, I can recap, here are the main ideas:
- @domenic suggested removing strong encapsulation from open shadow DOM along with opt in from the page author (so it does not accidentally traverse the shadow tree). @rniwa said MutationObserver does not traverse the shadow trees.
- @annevk suggested using `ElementInternals` but Domenic pointed out that that is specific to custom elements, and thus would not cover all shadow trees.
- In general there are two perspectives: exposing performance to the authors of the shadow tree or to the users. I don't have a strong opinion on which is preferable because they coincide in the 

> I also don't think calling it a design problem with shadow trees is particularly productive or helpful to what you are trying to achieve.

Apologies if this offended you, I didn't mean to say 'shadow DOM design is flawed because you cannot measure performance inside it', what I mean is 'I want to enable measuring performance inside shadow DOM and this requires some design work'. Help is appreciated in reaching a solution that people are happy with.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/848#issuecomment-542815646

Received on Wednesday, 16 October 2019 17:47:37 UTC