Skip to content

perf(cli): skip full hit-test stacks for visible text - #9256

Open
iwanturequity wants to merge 1 commit into
heygen-com:mainfrom
iwanturequity:perf/layout-audit-visible-text
Open

iwanturequity wants to merge 1 commit into
heygen-com:mainfrom
iwanturequity:perf/layout-audit-visible-text

Conversation

@iwanturequity

Copy link
Copy Markdown

What

Use the top hit to skip the full paint-stack query when the probe lands on the text, an ancestor, or a descendant.

Why

Most probes on unobstructed text stop at the first hit. On a 576-label Chromium fixture, the median audit time fell from 3.3 s to 1.6 s with identical findings.

Related work

Refs #9213. This covers the hit-stack shortcut. The scaling work remains open. Is this a good first step to take on?

How

Keep the existing paint-stack walk when the top hit is a separate element, so a transparent overlay can still reveal an opaque cover beneath it.

Test plan

  • Added a Chromium regression case for visible text and a transparent overlay above an opaque cover.
  • Ran 386 focused layout-audit tests across four suites.
  • Compared issue output and timings before and after the change in Chromium.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 2, 2026 10:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants