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
Closed: Nov 2016
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 567021

issue 589926

Sign in to add a comment

Dynamically inserted <link> always causes full document style recalc

Project Member Reported by, Feb 25 2016

Issue description

LinkStyle::removePendingSheet() does:

    if (type == NonBlocking) {
        // Tell StyleEngine to re-compute styleSheets of this m_owner's treescope.

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, Feb 29 2016

Blockedon: 567021

Comment 4 by, May 4 2016

Labels: Performance

Comment 5 by, Nov 21 2016

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