Bug 106291
Summary: | [Meta][Shadow] Incremental distribution | ||
---|---|---|---|
Product: | WebKit | Reporter: | Shinya Kawanaka <shinyak> |
Component: | DOM | Assignee: | Web Components Team <webcomponents-bugzilla> |
Status: | RESOLVED LATER | ||
Severity: | Normal | CC: | dominicc, webcomponents-bugzilla |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 103016 |
Shinya Kawanaka
Currently when an element is added/removed to/from host element, whole distribution happens.
However, in some cases, we can skip such distribution. This will significantly improve ShadowDOM performance.
We assume that content does not have some kinds of select attribute (e.g. div:first-of-type, etc.) here.
if this assumption does not hold, it's safer to cause whole distribution.
When removing an element:
we can just remove an element from distributed element.
When adding an element:
find the first InsertionPoint the element will be distributed to, and add to it. (You have to care about node order.)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dominic Cooney
We don’t know that this is a performance problem yet, and it will complicate the code. I would prefer to improve the quality of existing code first before embarking on this.