Skip to content

Profile Main Thread Activity for Desktop Grid Scrolling #9204

@tobiu

Description

@tobiu

Objective

To definitively identify the Main Thread bottleneck causing the 30 FPS cap on Desktop Grid scrolling.

Context

Previous investigations (#9199, #9203) established:

  • Scaling: Performance drops linearly with active cell count (~560 on Desktop).
  • Not Rendering: Removing styles/images/shadows does not improve FPS.
  • Not Throttling: Reducing update frequency does not improve FPS.

This leaves Main Thread Scripting (VDOM Patching) or Layout Thrashing as the prime suspects. We need to "see" the CPU time breakdown.

Tasks

  1. Capture Trace: Use Playwright (or manual DevTools) to capture a Chrome Performance Profile during the Desktop scroll benchmark.
  2. Analyze Trace:
    • Measure time spent in message events (Worker communication).
    • Measure time spent in Neo.main.DeltaUpdates.update (DOM Patching).
    • Measure time spent in Layout and Recalculate Style.
  3. Hypothesis Testing:
    • If Layout is high: We need to flatten the DOM (reduce Flexbox nesting).
    • If update is high: We need to optimize the VDOM diff/patch engine for this specific update pattern.

Outcome

A clear "blame assignment" (Layout vs. Scripting) to guide the next optimization phase.

Metadata

Metadata

Assignees

Labels

aiperformancePerformance improvements and optimizationstesting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions