-
-
Notifications
You must be signed in to change notification settings - Fork 734
perf: rspack sources memory #12038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: rspack sources memory #12038
Conversation
✅ Deploy Preview for rspack canceled.
|
|
📝 Benchmark detail: Open
|
📦 Binary Size-limit
❌ Size increased by 12.13KB from 47.85MB to 47.86MB (⬆️0.02%) |
CodSpeed Performance ReportMerging #12038 will not alter performanceComparing Summary
|
a482450 to
f595df1
Compare
|
📝 Benchmark detail: Open
|
|
📝 Benchmark detail: Open
|
0420bd9 to
378f128
Compare
|
📝 Benchmark detail: Open
|
|
📝 Benchmark detail: Open
|
|
📝 Benchmark detail: Open
|
|
📝 Benchmark detail: Open
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the rspack_sources dependency from version 0.4.13 to 0.4.14 and adapts the codebase to accommodate API changes in the new version. The main change is that the map() method now requires an ObjectPool parameter for improved performance through memory pooling in parallel contexts.
Key changes:
- Updated
rspack_sourcesversion to0.4.14andthread_localto1.1.9 - Added
ObjectPoolparameter to allmap()method calls across the codebase - Used thread-local
ObjectPoolinstances in parallel processing contexts to avoid contention - Changed source content storage from
StringtoArc<str>for more efficient memory sharing
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated rspack_sources to 0.4.14 and thread_local to 1.1.9 |
| Cargo.lock | Lock file updates for new dependency versions |
| crates/rspack_plugin_swc_js_minimizer/* | Added thread-local ObjectPool for parallel source map operations |
| crates/rspack_plugin_lightning_css_minimizer/* | Added thread-local ObjectPool and changed original_source to Arc |
| crates/rspack_plugin_rsdoctor/* | Added thread-local ObjectPool for parallel module processing |
| crates/rspack_plugin_devtool/* | Added ObjectPool parameter to map() calls in devtool plugins |
| crates/rspack_core/src/utils/extract_source_map.rs | Changed sources_content_vec to use Arc instead of String |
| crates/rspack_loader_lightningcss/src/lib.rs | Changed source content mapping to Arc |
| crates/rspack_javascript_compiler/src/compiler/stringify.rs | Updated source content processing to use Arc |
| crates/rspack_cacheable/* | Updated test code to use ObjectPool with map() calls |
| crates/rspack_binding_api/src/source.rs | Added ObjectPool parameter to map() call |
| tests/rspack-test/statsAPICases/* | Updated test snapshots with new hash values |
| tests/rspack-test/statsOutputCases/* | Updated test snapshots with new hash values and asset names |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Relate https://github.com/web-infra-dev/rspack-sources/releases/tag/0.4.14
Related links
Checklist