feat: add runnable benchmark suite for diff viewer comparison#5
Merged
Zhang-JiahangH merged 9 commits intoApr 7, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
react-virtualized-diffagainst common alternatives (react-diff-viewer,react-diff-view) on large inputs prior to release.Description
apps/benchmarkwhich generates synthetic diffs and can render any of the three libraries via URL params; new files includeapps/benchmark/src/main.tsx,apps/benchmark/index.html,apps/benchmark/package.json,apps/benchmark/tsconfig.json, andapps/benchmark/vite.config.ts.scripts/run-benchmark.mjsthat launches the benchmark app and uses Playwright to exercise every combination of library and sizes (1k / 10k / 50k / 100klines), then writes results tobenchmark-results/results.jsonandbenchmark-results/results.md.package.jsonto add abenchmarkscript (node ./scripts/run-benchmark.mjs) and declaredplaywrightas a dev dependency, and added README documentation describing how to run the suite and the produced output files.Testing
node --check scripts/run-benchmark.mjspassed static Node syntax check successfully.pnpm installfailed in this execution environment due to npm registry authorization (403) so dependencies could not be installed and integration run could not be performed here.pnpm -r typecheckfailed becauseapps/benchmarktype dependencies (vite/client) were not available due to the failed install (TypeScript errorTS2688).Codex Task