LearnNewsExamplesServices
Frontmatter
id9208
titleInvestigate Playwright OffscreenCanvas Performance on Desktop
stateOpen
labels
aitestingperformance
assigneestobiu
createdAtFeb 19, 2026, 11:54 AM
updatedAtFeb 19, 2026, 1:10 PM
githubUrlhttps://github.com/neomjs/neo/issues/9208
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

Investigate Playwright OffscreenCanvas Performance on Desktop

Openaitestingperformance
tobiu
tobiu commented on Feb 19, 2026, 11:54 AM

Context: During the GridScrollBenchmark investigation, we observed that while the Grid (Main Thread) scrolls at >1000 FPS in the test environment, the OffscreenCanvas animations (Header, Sparklines) running in a Worker appear "frozen" or extremely choppy (~4 FPS) on larger viewports (Laptop/Desktop) in Headless Chrome.

Observations:

  • Mobile (375x667) animations are mostly smooth.
  • Desktop (1920x1080) animations are frozen.
  • Local Chrome (Headed) on the same machine runs everything at 60 FPS+.
  • Forcing deviceScaleFactor: 1 did NOT solve it.
  • Disabling background throttling did NOT solve it.

Objective: Investigate why Playwright/Headless Chrome struggles to composite Worker-driven OffscreenCanvas updates on high-resolution viewports. Is it a message passing bottleneck, a compositor scheduling issue, or a specific Headless Chrome limitation?

Tasks:

  1. Create a dedicated CanvasAnimationBenchmark.spec.mjs.
  2. Profile the CanvasWorker thread during the test.
  3. Experiment with transferControlToOffscreen vs ImageBitmap commit strategies.
tobiu added the ai label on Feb 19, 2026, 11:54 AM
tobiu added the testing label on Feb 19, 2026, 11:54 AM
tobiu added the performance label on Feb 19, 2026, 11:54 AM
tobiu assigned to @tobiu on Feb 19, 2026, 1:10 PM