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

Consider string allocations #2868

Open
Ms2ger opened this issue Jul 18, 2014 · 2 comments
Open

Consider string allocations #2868

Ms2ger opened this issue Jul 18, 2014 · 2 comments

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Jul 18, 2014

We do a lot of string allocations/copies in the DOM; perhaps an Rc<str>/&'static str enum would be better.

@seanmonstar
Copy link
Contributor

@seanmonstar seanmonstar commented Aug 20, 2014

I noticed this in that get_attribute is used a lot for simple comparisons, but that does a clone on the String. In many cases, a get_attribute_ref would probably suffice, no?

@jdm
Copy link
Member

@jdm jdm commented Aug 26, 2014

That sounds eminently reasonable!

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.