Skip to content

Reduce redraw overhead of experimental function components #108

Open

Description

@1bye

Context

#48 landed signal-based function components behind experimental-reactive with a documented performance gap. This issue tracks the remaining performance work from #27. Keep the existing GPUI version and public signal behavior while testing Rake-side improvements.

Baseline

The headless macOS benchmark updates 10,000 mounted rows with one signal per Rake row, in one application update and one draw. On an Apple M1 Max with gpui-pre 0.3.11, median process CPU time was 47.48 ms for plain uncached GPUI and 63.40 ms for stock uncached Rake, a 34.5% median paired slowdown across three runs. A parent redraw immediately after the bulk update took 45.19 ms for plain GPUI and 54.06 ms for Rake.

A scratch variant that registered dependencies once at mount saved little. Skipping the signal-to-view observer as well still missed the 10% target in every run. That control only tested a fully uncached tree. The earlier matched cached bulk benchmark also missed the target. PR #48 results · Benchmark report

Next experiment

Benchmark reusing already-mounted component handles on parent redraws. Keep normal signal storage, dependency tracking, observers, row contents, and write behavior. Pair the retained-handle variant with stock Rake and plain GPUI in the same build. This will estimate how much overhead comes from reaching the mounted component again, including keyed lookup and prop comparison.

Acceptance

  • Compare bulk updates and the following parent redraw across repeated runs. Report p50, p95, and allocations with the same row count, update pattern, and cache policy. Retain the ~10% target from #[rake::component]: function components with signals, benchmarked against plain GPUI #27 for matched workloads.
  • Verify one draw per update, the displayed values of all updated rows, and clean disposal after unmount.
  • Before adopting a runtime change, verify changed props, keyed reorder and removal, and invalidation through cached ancestors.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions