perf: benchmark incremental HMR rebuilds - #14955
Conversation
|
📝 Benchmark detail: Open No benchmark data for commit fe6890c, trying parent...
Current persistent cache hit rate: 👍 |
Deploying rspack with
|
| Latest commit: |
6df3520
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b7a5e6e1.rspack-v2.pages.dev |
| Branch Preview URL: | https://seal-perf-incremental-hmr-co.rspack-v2.pages.dev |
📦 Binary Size-limit
🙈 Size remains the same at 66.79MB |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 5 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 popular-libsPath:
📁 react-10kPath:
📁 react-1kPath:
📁 react-5kPath:
📁 ui-componentsPath:
Generated by Rsdoctor GitHub Action |
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6df3520679
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for _ in 0..32 { | ||
| watcher.trigger_event(&ArcPath::from(watched_file.as_str()), FsEventKind::Change); | ||
| } |
There was a problem hiding this comment.
Advance the mtime before injecting watcher changes
For an existing watched file, watch() records its current mtime, and Trigger::on_event suppresses a Change when that mtime has not advanced. Because this loop never modifies the file after registration, all 32 synthetic events are filtered before reaching the executor, so this benchmark cannot measure event aggregation or handler dispatch as intended. Mutate the file before triggering, or inject benchmark events below the stale-event filter and await their delivery.
Useful? React with 👍 / 👎.
| ), | ||
| (std::iter::empty(), std::iter::empty()), | ||
| (std::iter::empty(), std::iter::empty()), | ||
| std::time::SystemTime::UNIX_EPOCH, |
There was a problem hiding this comment.
Avoid scheduling a startup event from the epoch
For this freshly created watched file, passing UNIX_EPOCH makes the watcher's startup scanner unconditionally classify it as changed because its mtime is newer than the supplied start time. The scan runs asynchronously, so that extra event races with pause() and close(), causing samples to inconsistently include or abort handler work unrelated to the explicit event loop. Use a start time at or after fixture setup and synchronize completion of the events being measured.
Useful? React with 👍 / 👎.
Summary
Add CodSpeed coverage for the incremental optimization stack. The benchmark uses a large code-split graph with CSS and copied assets, performs repeated JavaScript and CSS leaf rebuilds, and exercises the native watcher lifecycle and event path.
The cases provide a common baseline for evaluating the graph reuse, process-assets, copy cache, HMR runtime, CSS HMR, and watcher changes in the dependent pull requests.
Related links
Checklist