[Webkit-unassigned] [Bug 56842] New: Performance regression: Blocking inline scripts on external sheets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 22 10:39:22 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56842

           Summary: Performance regression: Blocking inline scripts on
                    external sheets
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: tonyg at chromium.org
                CC: hyatt at apple.com, ap at webkit.org, koivisto at iki.fi,
                    mbelshe at chromium.org, jamesr at chromium.org,
                    tonyg at chromium.org
        Depends on: 45072
            Blocks: 8852


http://trac.webkit.org/changeset/74995/ seems to be causing significant page load time regressions for several Google properties. More data is still coming in, but certain Google properties load 10-20% slower after this behavior change. The regression was noticed in Chrome 10, and I've isolated it to this change in local builds.

As explained in https://bugs.webkit.org/show_bug.cgi?id=51684#c9, this change was made for better web compat. So it may not be possible or a good idea to simply roll back even though the actual perf hit for some sites was much bigger than anticipated. The purpose of this bug is to find a way to mitigate this perf regression.

Here are some ideas:

1. When a script is blocked on a stylesheet, we could allow it to be compiled while still waiting on the stylesheet. Currently we block both compilation and execution. As far as I can tell, this is an orthogonal optimization that would be perfectly safe but probably wouldn't recover most of the regression.
2. Rather than blocking scripts on stylesheet loads, we allow them to execute, but then block their execution when they call out for layout. Since this involves hitting the event loop in a new place, this could be tricky or impossible to get right. However, the win would be nice as I suspect this would allow most scripts to not block on stylesheets at all.
3. Currently we block scripts on styles whether the script is in the head or body. Unless I'm missing something, this blocking behavior should only be required for scripts in the body as layout isn't applicable while parsing the head. If this change works, it would recover the regression from at least one case that I'm aware of.
4. Currently the preload scanner doesn't operate while parsing the head. This makes it especially bad to block on a script in the head. If we can fix #3, this would be moot. I also suspect this would help in many other cases. (filed as bug 45072)

Thoughts? Other ideas?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list