New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 589929 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 567021

Blocking:
issue 589926



Sign in to add a comment

Dynamically inserted <link> always causes full document style recalc

Project Member Reported by esprehn@chromium.org, Feb 25 2016

Issue description

LinkStyle::removePendingSheet() does:

    if (type == NonBlocking) {
        // Tell StyleEngine to re-compute styleSheets of this m_owner's treescope.
        m_owner->document().styleEngine().modifiedStyleSheetCandidateNode(m_owner);
        return;
    }
    m_owner->document().styleEngine().removePendingSheet(m_owner);

and since non-parser inserted sheets are non-blocking this means we go into   modifiedStyleSheetCandidateNode which does resolverChanged(FullStyleUpdate);

the other codepath through removePendingSheet does:

removePendingSheet => didRemoveAllPendingStylesheet =>         styleResolverMayHaveChanged() =>     styleEngine().resolverChanged(hasNodesWithPlaceholderStyle() ? FullStyleUpdate : AnalyzedStyleUpdate);

Facebook during page load inserts sheets dynamically for each component BigPipe loads, this results in a full document style recalc every time.
 
Blocking: 589926
Status: Available (was: Untriaged)

Comment 3 by r...@opera.com, Feb 29 2016

Blockedon: 567021

Comment 4 by meade@chromium.org, May 4 2016

Labels: Performance

Comment 5 by r...@opera.com, Nov 21 2016

Owner: r...@opera.com
Status: Fixed (was: Available)
The two mentioned places now use AnalyzedStyleUpdate. It doesn't help much if you have @media rules, though.

I'll set this to fixed and let 567021 fix the @media case. I'm hoping to land the last parts of 567021 during the next couple of weeks.

Sign in to add a comment