-
-
Notifications
You must be signed in to change notification settings - Fork 682
perf: reduce memory allocation in esm_export_imported_specifier_dependency
#10657
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: reduce memory allocation in esm_export_imported_specifier_dependency
#10657
Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
CodSpeed Performance ReportMerging #10657 will create unknown performance changesComparing Summary
Benchmarks breakdown
|
4bc6561
to
233b1c6
Compare
nice job! it's meaningful to remove unnecessary unwrap, we have too much unnecessary now |
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.
LGTM, should run benchmark before merging
📝 Benchmark detail: Open
|
Summary
Some performance improvements after #10584
ExportsMode
to enum variants and box theDynamicReexport
case since it's larger than other variants. Data size: 112 bytes -> 40 bytes. This change also eliminates unnecessaryOption::expect
.Vec
toHashSet
reallocation. The data structures I change fromVec
toHashSet
in this pr are actuallySet
s in webpack.map.clear
rather than reallocate a new map in the loop.Checklist