-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(css/ast): Reduce token size #6569
Conversation
I think we can |
crates/swc_css_ast/src/token.rs
Outdated
deserialize = "__D: rkyv::de::SharedDeserializeRegistry" | ||
)) | ||
)] | ||
pub enum Token { |
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.
I think this is too much boxing.
Are you trying to optimive memmove
?
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.
I tried different things, lexer is faster when we box tokens, because we use them in AST, i.e. ComponentValues::PreservedTokens
, so memory usage was improved good, parser performance unfortunately was not very improved
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.
Edit: We need to box Url
, Dimension
, BadUrl
crates/swc_css_lints/src/rules/font_family_no_duplicate_names.rs
Outdated
Show resolved
Hide resolved
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.
Thanks!
swc-bump:
- swc_css_ast --breaking
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.
Automated review comment generated by auto-rebase script
Description:
This is one of the performance improvements PR
Parser was improved too
BREAKING CHANGE:
Yes
Related issue (if exists):
No