You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
avoid storing owned string content for assets that do not reference any tracked content hash
skip building intermediate batch_sources/asset_contents when no update_hash hook is registered
avoid no-op asset updates in the final rewrite pass and add focused unit tests for the new fast paths
Related links
ecosystem benchmark will be triggered after PR creation
Why
RealContentHashPlugin was doing extra allocation and bookkeeping work even when assets had no relevant hash matches, when no hook consumed the rebuilt sources, or when the final asset update was effectively a no-op. This change keeps the existing behavior but removes those redundant paths.
LingyuCoder
changed the title
fix(real-content-hash): skip redundant work in hash pass
perf(real-content-hash): skip redundant work in hash pass
Apr 8, 2026
Merging this PR will degrade performance by 36.71%
🎉 Hooray! codspeed-node just leveled up to 5.2.0!
A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳! Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.
⚠️Note: The latest commit (84288f48aa) does not have baseline artifacts. Using commit 9985337b82 for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.
Found 6 projects in monorepo, 0 projects with changes.
❌ Size increased by 416bytes from 49.35MB to 49.35MB (⬆️0.00%)
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
release: performancerelease: performance related release(mr only)teamThe issue/pr is created by the member of Rspack.
1 participant
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.
Summary
batch_sources/asset_contentswhen noupdate_hashhook is registeredRelated links
Why
RealContentHashPluginwas doing extra allocation and bookkeeping work even when assets had no relevant hash matches, when no hook consumed the rebuilt sources, or when the final asset update was effectively a no-op. This change keeps the existing behavior but removes those redundant paths.Validation
cargo test -p rspack_plugin_real_content_hashcargo clippy -p rspack_plugin_real_content_hash --all-targets -- -D warningscargo fmt --all --checkpnpm run build:binding:devpnpm -C tests/rspack-test exec rstest run --include Hash.test.js -t "hashCases-hashCases/real-content-hash" --project base --bail 1pnpm -C tests/rspack-test exec rstest run --include Config.part3.test.js -t "configCases-configCases/sri/runtime-requirement" --project base --bail 1Checklist