-
-
Notifications
You must be signed in to change notification settings - Fork 562
perf(minifier): avoid temp String
s and copying string data
#10733
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(minifier): avoid temp String
s and copying string data
#10733
Conversation
CodSpeed Instrumentation Performance ReportMerging #10733 will not alter performanceComparing Summary
|
64a342b
to
1d135b6
Compare
d1ede38
to
871e9bb
Compare
871e9bb
to
15c052e
Compare
1d135b6
to
44f1952
Compare
15c052e
to
ef1fc7c
Compare
""" WalkthroughThe changes across several modules in the minifier refactor the handling of string and BigInt literals to consistently use the Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms (11)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Merge activity
|
ef1fc7c
to
358a589
Compare
Optimize string handling in minifier: * Avoid temporary `String`s by constructing strings directly in arena using `format_atom!`. * Avoid temporary `String`s by concatenating strings in arena with `AstBuilder::atom_from_strs_array`. * Avoid string copying when creating an `Atom` from a borrowed `Cow<'a, str>`. * Reuse existing slices of text already in arena, rather than copying string data to create new `Atom`s (`replace_known_methods.rs`). * Reuse existing `Atom` instead of creating a new one (`substitute_alternate_syntax.rs`).
358a589
to
c279f16
Compare
Optimize string handling in minifier:
String
s by constructing strings directly in arena usingformat_atom!
.String
s by concatenating strings in arena withAstBuilder::atom_from_strs_array
.Atom
from a borrowedCow<'a, str>
.Atom
s (replace_known_methods.rs
).Atom
instead of creating a new one (substitute_alternate_syntax.rs
).