Skip to content

Make 50K-point GPU performance coverage durable and optimize rendered frames #141

Description

@kostyafarber

Problem

The Playwright GPU workflow has been red across multiple changes, but the failures were harness drift rather than performance regressions. In run 29039513862, all eight cases timed out on #/launcher and never executed a benchmark.

Repairing the harness exposed a separate, real performance problem: synchronous 50K-point edits are reasonably fast, while the rendered scene frame is not.

Local measurements on 2026-07-09:

Operation p95
50K-point draft mutation 15.1 ms
50K-point rendered translation frame 291.3 ms
50K-point rendered pan frame 178.4 ms
settled undo approximately 470 ms
settled redo approximately 480 ms

An earlier local run reached 448 ms p95 for rendered translation, so this path is also variable enough that CI should retain raw reports.

Why the suite drifted

  • The fixtures sent the removed external:open-font IPC event.
  • Opening a font now creates a workspace window; fixtures retained the launcher page.
  • The E2E build omitted the workspace utility entry point.
  • Packaged/E2E renderers use an opaque file: origin, but port handoff required exact origin equality.
  • Performance code used window as any and called deleted editor APIs, so typecheck could not detect drift.
  • Tests shared development userData; force-exited dirty 50K edits could be recovered by later cases.
  • Several samples measured synchronous setters while claiming to include rendering and GPU compositing.
  • The PR path filter did not cover several bootstrap/workspace files that can break E2E.

Durable benchmark contract

  • Open the font through a supported typed main-process test capability.
  • Follow the workspace window and wait for the real font-loaded invariant.
  • Build main, workspace utility, preload, and renderer entries.
  • Use a typed renderer performance harness; no any escape hatch.
  • Isolate app data per test and remove it at teardown.
  • Verify that every benchmark inserted at least 50K points.
  • Assert an active WebGL marker context for rendered-frame cases.
  • Keep direct marker-canvas visual coverage.
  • Measure synchronous mutation, persisted operation, and rendered-frame cost separately.
  • Run visual smoke tests before the expensive GPU suite.
  • Trigger the workflow for main/preload/workspace/E2E harness changes.
  • Publish raw CI reports for historical comparison rather than comparing local hardware baselines.

Rendering follow-up

  • Profile the scene pass separately from marker packing/upload/draw.
  • Identify why translating or panning 50K selected points produces 178-291 ms p95 frames.
  • Determine whether scene culling, retained render data, or marker-buffer reuse should be the first optimization.
  • Add a CI-stable regression target once the primary bottleneck is understood.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions