Skip to content
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: use cow-utils instead #761

Closed
heygsc opened this issue Jan 12, 2025 · 2 comments · Fixed by #773
Closed

perf: use cow-utils instead #761

heygsc opened this issue Jan 12, 2025 · 2 comments · Fixed by #773

Comments

@heygsc
Copy link
Contributor

heygsc commented Jan 12, 2025

We can improve performance by using cow_utils, and automatically check in clippy.

We have done similar work before, and if necessary and possible, I would like to provide pr for gosub.

Related issue:
#752
oxc-project/oxc#5586

@jaytaph
Copy link
Member

jaytaph commented Jan 12, 2025

Hi!. This is something we really want as well.. The html parser for instance is written at a time there wasn't too much experience with Rust, so there is a lot of cloning and copying of data which probably shouldn't happen. @Sharktheone your thoughts?

@Sharktheone
Copy link
Member

I think this is something we can do. Maybe we can save this as a more general string optimization. For example, in some places, we should replace the std String with some SmallString variant. Or more specifically, in the HTML parser we are currently not sharing the namespace. And I think we also store the source file name, that should also be shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants