Re: [WICG/webcomponents] [scoped-registries] Proposal for registry extension (Issue #989)

fwiw, I think in practice registry inheritance is only going to be of much use when there is component inheritance and the base component uses child components itself. I think this is a fairly rare situation in the code bases I've seen, which haven't features deep class hierarchies where the base classes also creates shadow DOM.

In a fully-scoped app, the number of registries should equal the number of component _definitions_, with the registries shared across all instance of a definition (except in some rare dynamic cases). Registry inheritance probably wouldn't reduce this much. In theory you could find common subsets of dependencies among components, but this won't reduce the registry count. It might reduce the number of raw external registrations, but that might or might not give a perf benefit based on implementation.

Regarding the benchmark, it's testing a polyfill which might not scale the same as a native implementation. And 2000 component definitions is a massive number that I haven't even seen in the largest apps. Photoshop uses ~100 on most pages, YouTube a couple hundred.

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

Message ID: <WICG/webcomponents/issues/989/1507240875@github.com>

Received on Thursday, 13 April 2023 16:17:21 UTC