perf(core): reduce file size report allocations#7941
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
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. Comment |
Summary
This PR reduces allocation overhead in the file size reporter while keeping the same reporting behavior.
It avoids building unused snapshot data when diff output is disabled, folds asset collection/filtering/formatting into one traversal, skips default-excluded assets before materializing content, and reduces temporary path/width calculation arrays.
Performance data:
@rsbuild/coreself time:49.8 ms->42.1 ms(-7.7 ms)20.6 ms->12.5 ms(-8.2 ms)