Skip to content

Capture production-like RSC benchmark timing#12

Draft
justin808 wants to merge 10 commits intojg-codex/dev-server-env-overridesfrom
jg-codex/production-like-rsc-profiling
Draft

Capture production-like RSC benchmark timing#12
justin808 wants to merge 10 commits intojg-codex/dev-server-env-overridesfrom
jg-codex/production-like-rsc-profiling

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Apr 30, 2026

Summary

Adds the next stacked benchmark/docs pass on top of #10.

  • records /rsc_payload/ resource detail in benchmark JSON when the browser exposes a separate payload resource
  • promotes RSC payload timing/transfer fields into the alternating comparison output
  • documents the first production-like local benchmark using compiled Shakapacker/Rspack assets, compiled RSC demo bundles, no Shakapacker dev server, and a dedicated React on Rails Pro Node renderer
  • updates README/status/performance handoff/upstream draft with the new result and caveats

Production-like benchmark result

production-like-alternating-8-reindexed, 8 alternating cycles, one warmup request per measured run, matching Chrome/ChromeDriver 147:

  • median navigation: Inertia 775.40ms, RSC 607.15ms, -21.7%
  • median LCP: Inertia 794.00ms, RSC 634.00ms, -20.2%
  • median responseEnd: Inertia 644.80ms, RSC 588.80ms, -8.7%
  • median action_total: Inertia 346.87ms, RSC 339.20ms, -2.2%
  • JS requests: Inertia 6, RSC 1, -83.3%
  • caution: p95 responseEnd still favors Inertia, 730.62ms vs 768.25ms, +5.2%

The first long run wrote 14/16 samples and then hit a Selenium Net::ReadTimeout while loading the RSC route. The final summary was completed with --reuse-existing, which reused the completed per-run JSON files and measured the two missing samples.

Caveat

The current RSC route streams its payload inline, so it does not expose a browser resource named /rsc_payload/ on initial load. The new resource timing fields are therefore empty for this implementation until we expose a separate payload resource or add renderer-internal timing.

Validation

  • ruby -c scripts/perf/measure_dashboard.rb
  • ruby -c scripts/perf/compare_dashboard_routes.rb
  • payload-summary Ruby smoke test for rscPayload.resources and resource-level serverTiming
  • bundle exec rubocop scripts/perf/measure_dashboard.rb scripts/perf/compare_dashboard_routes.rb
  • git diff --check
  • RAILS_ENV=production NODE_ENV=production bin/shakapacker
  • RAILS_ENV=production NODE_ENV=production npm run build:rsc-demo
  • DISABLE_SPRING=1 OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES bin/rails runner 'DevTools.delete_all_indices_and_reindex_all'
  • ruby scripts/perf/compare_dashboard_routes.rb --base-url https://gumroad.dev --measure-base-url https://gumroad.dev --path /dashboard/inertia_demo --path /dashboard/rsc_demo --label production-like-alternating-8-reindexed --cycles 8 --server-warmup-requests 1 --require-driver-match --reuse-existing

Note

Low Risk
Low risk: changes are limited to benchmark harness scripts and documentation, with no impact on app runtime behavior beyond how performance results are measured and reported.

Overview
Adds production-like benchmarking guidance and results across README and performance docs, including a new compiled-assets + dedicated renderer run and explicit caveats about tail latency (p95 responseEnd) and inline-streamed RSC payloads.

Enhances the perf harness to capture /rsc_payload/ resource timing/transfer details (including resource-level serverTiming) and promotes these fields into the alternating comparison output (compare_dashboard_routes.rb), alongside small Ruby refactors for cleaner collection/summarization.

Reviewed by Cursor Bugbot for commit 010b356. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 356b4f9f-a26d-4d4d-8e25-2f209110e643

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/production-like-rsc-profiling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Keep demo smoke renderer in CI step
…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Address dashboard demo review findings
…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Address remaining demo review findings
…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Address dashboard currency review findings
…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Use purchase currency for activity prices
…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Fix dashboard demo timezone prop typing
…tion-like-rsc-profiling

* jg-codex/dev-server-env-overrides:
  Skip directories in Rspack entry discovery
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.

1 participant