Skip to content

feat(demo): add /benchmark page with diff performance comparison#4

Closed
Zhang-JiahangH wants to merge 2 commits into
mainfrom
codex/add-benchmark-page-with-performance-metrics
Closed

feat(demo): add /benchmark page with diff performance comparison#4
Zhang-JiahangH wants to merge 2 commits into
mainfrom
codex/add-benchmark-page-with-performance-metrics

Conversation

@Zhang-JiahangH
Copy link
Copy Markdown
Owner

Motivation

  • Provide a focused /benchmark demo page that compares rendering performance and resource usage for large diffs (1k / 10k / 50k / 100k lines) against react-diff-viewer and react-diff-view.
  • Surface an easy-to-read table + chart view and a short conclusion to help evaluate push-limit scenarios (100k+ lines) for the project.

Description

  • Add a path-based /benchmark route in apps/demo/src/App.tsx that renders BenchmarkPage when window.location.pathname === '/benchmark'.
  • Implement BenchmarkPage with a comparison table (FPS, initial render ms, memory MB) for 1k/10k/50k/100k rows and a compact MetricBars component for simple bar-chart visualization.
  • Populate example benchmark data for virtualized-diff, react-diff-viewer, and react-diff-view and compute a one-line conclusion showing 50k-line speedup.
  • Add demo link to the home page and update styles in apps/demo/src/index.css for table, chart cards, conclusion, and notes.

Testing

  • Running pnpm --filter react-virtualized-diff build completed successfully and produced types for the package.
  • Running pnpm --filter demo typecheck initially failed before the package was built, and succeeded after building the package.
  • The demo type-check (pnpm --filter demo typecheck) passed after the build step.

Codex Task

@Zhang-JiahangH
Copy link
Copy Markdown
Owner Author

Dynamic benchmark testing is blocked by the comparators, as they are unable to load files exceeding 50k lines.

@Zhang-JiahangH Zhang-JiahangH deleted the codex/add-benchmark-page-with-performance-metrics branch April 8, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant