RESOLVED FIXED 99428
[Shadow DOM][V8] WebCore::V8DOMWindow::installPerContextProperties() is slow when shadowDOMEnabled flag is on.
https://bugs.webkit.org/show_bug.cgi?id=99428
Summary [Shadow DOM][V8] WebCore::V8DOMWindow::installPerContextProperties() is slow ...
Hajime Morrita
Reported 2012-10-16 00:29:26 PDT
This upstreams http://code.google.com/p/chromium/issues/detail?id=155620 A profiling unveiled that this installPerContextProperties() is slower if the flag is on. It makes sense since it injects extra DOMWindow properties at runtime. My assumption is that installPerContextProperties() is called only a few times per page. But there are some outliers in page cycler suite which consume 1.3% time in this function for each page load. I'll make some micro-benchmark for this.
Attachments
Patch (15.04 KB, patch)
2012-10-16 20:17 PDT, Hajime Morrita
no flags
Patch for landing (15.00 KB, patch)
2012-10-16 21:50 PDT, Hajime Morrita
no flags
Hajime Morrita
Comment 1 2012-10-16 00:33:51 PDT
Basically there are two approaches to fix this. A. Stop using EnablePerContext: Considering Chromium make it available for the wild Web, The Shadow DOM feature does no longer need to be contextual. B. Make EnablePerContext faster somehow. I have no concrete idea yet. But maybe we should do this for other features which uses this contextual switch mechanism. My feeling is that we can land A first then attack B if possible.
Dimitri Glazkov (Google)
Comment 2 2012-10-16 07:35:38 PDT
(In reply to comment #1) > My feeling is that we can land A first then attack B if possible. That sounds good.
Hajime Morrita
Comment 3 2012-10-16 20:17:26 PDT
Hajime Morrita
Comment 4 2012-10-16 21:50:46 PDT
Created attachment 169085 [details] Patch for landing
WebKit Review Bot
Comment 5 2012-10-16 22:39:05 PDT
Comment on attachment 169085 [details] Patch for landing Clearing flags on attachment: 169085 Committed r131549: <http://trac.webkit.org/changeset/131549>
WebKit Review Bot
Comment 6 2012-10-16 22:39:09 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.