Skip to content

Bug 2069393 - Collect stylesheet invalidations more lazily. r=#style - #358

Closed
emilio wants to merge 1 commit into
mozilla-firefox:autolandfrom
emilio:lazy-invalidation
Closed

emilio wants to merge 1 commit into
mozilla-firefox:autolandfrom
emilio:lazy-invalidation

Conversation

@emilio

@emilio emilio commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

We already keep track of whether a stylesheet has been committed or not,
so this patch:

  • Avoids collecting invalidations for removals that haven't made it to
    the document.
  • Avoids collecting invalidations for insertions that get removed too
    early.

This helps with bug 2065622, because most of the time in invalidation
there is just useless.


Lando: link
Bugzilla: bug 2069393

⚠️ This pull request has 3 warnings.
🚫 This pull request has 1 blocker.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

View this pull request in Lando to land it once approved.

@emilio
emilio requested a review from a team September 4, 2026 15:32
) -> StylesheetInvalidationSet {
let (flusher, mut invalidations) = self.stylesheets.flush();
// TODO(emilio): We don't collect invalidations for shadow trees, see
// Servo_StyleSet_FlushStyleSheets.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe "for same reasons as specified in Servo_StyleSet_FlushStyleSheets?"

}

/// Collects invalidations for the sheets that have been added since the
/// last flush. Sheets that are added and removed before a flush don't

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later part of this comment seems to belong in Line 401?

Comment thread servo/components/style/stylesheet_set.rs
Comment thread servo/components/style/stylesheet_set.rs
Comment thread servo/components/style/stylesheet_set.rs
We already keep track of whether a stylesheet has been committed or not,
so this patch:

 * Avoids collecting invalidations for removals that haven't made it to
   the document.
 * Avoids collecting invalidations for insertions that get removed too
   early.

This helps with bug 2065622, because most of the time in invalidation
there is just useless.
lando-worker Bot pushed a commit that referenced this pull request Sep 4, 2026
We already keep track of whether a stylesheet has been committed or not,
so this patch:

 * Avoids collecting invalidations for removals that haven't made it to
   the document.
 * Avoids collecting invalidations for insertions that get removed too
   early.

This helps with bug 2065622, because most of the time in invalidation
there is just useless.

Pull request: #358
@lando-worker

lando-worker Bot commented Sep 4, 2026

Copy link
Copy Markdown

Pull request closed by commit ca0576f

@lando-worker lando-worker Bot closed this Sep 4, 2026
github-actions Bot pushed a commit to DioxusLabs/stylo that referenced this pull request Sep 5, 2026
We already keep track of whether a stylesheet has been committed or not,
so this patch:

 * Avoids collecting invalidations for removals that haven't made it to
   the document.
 * Avoids collecting invalidations for insertions that get removed too
   early.

This helps with bug 2065622, because most of the time in invalidation
there is just useless.

Pull request: mozilla-firefox/firefox#358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants