[webkit-dev] Web Components development will continue in a branch in near future

Bem Jones-Bey bjonesbe at adobe.com
Tue Feb 18 14:32:33 PST 2014


On 2/18/14, 13:54 , "Maciej Stachowiak" <mjs at apple.com<mailto:mjs at apple.com>> wrote:


On Feb 18, 2014, at 7:44 AM, Adam Barth <abarth at webkit.org<mailto:abarth at webkit.org>> wrote:

Hi Ryosuke,

On Sat, Feb 15, 2014 at 4:07 PM, Ryosuke Niwa <rniwa at webkit.org<mailto:rniwa at webkit.org>> wrote:
Now that we've removed all of the existing shadow DOM implementations from trunk in http://trac.webkit.org/changeset/164131, I'm intending to work on new web components implementations in a branch based on the feedback Apple has given on public-webapps and www-style in near future, probably starting with custom elements.

I'd like to implement them in a branch to not inadvertently introduce performance regressions.  The old implementation on trunk resulted in 5% overall slowdown in the page load time but we didn't quantify that until we removed the feature entirely last year.  That's probably because the feature was added over years as a pile of small changesets each of which introduced immeasurably small performance regressions.  Development in a branch allows a faithful performance comparison between the two.

The approach we were successful with in Blink was to restructure how we construct the render tree.  At the time Blink branched from WebKit, the algorithm we both used to construct the render tree was N^2.  The inner loop of the N^2 algorithm contained more complex DOM traversals due to shadow DOM.  When you profile the code, it looks like shadow DOM is expensive, but the bigger win is just to remove the N^2 algorithm, which we've done in Blink.  After removing the N^2 algorithm, shadow DOM related code falls off the profile completely.

I hope you view this message as constructive feedback.  My hope is that you'll be successful implementing shadow DOM, and I wanted to share what we've learned in case that's useful to you.

Thanks, Adam. We hope that we will be successful implementing shadow DOM as well.

Do you have any more specific pointers that Ryosuke et al could look at for the O(N^2) algorithm? Like a commit range or a function to look at?

I think it may be: https://codereview.chromium.org/24350009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20140218/32708484/attachment.html>


More information about the webkit-dev mailing list