-
Notifications
You must be signed in to change notification settings - Fork 125
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
Avoid format!
in the inner loop.
#33
Comments
Specifically, I think the trick will be to have a |
Just to double-check with @Stebalien that |
That sounds like it should work. StrStack implements This is how I'm currently using it: https://github.com/Stebalien/gazetta/blob/b9bb26b8ebc633ab18445dd3f3cf0b4a9330f90f/core/src/render.rs#L177-L186 |
Currently, we use
format!
in a number of places in order to pass appropriate values toBytesStart::with_attributes
. That's really sad, because it means we're allocating tons of littleString
items. It'd be far better if we instead just had a single buffer that usewrite!()
to write into, and then pulled out slices of to get the attribute substrings. I don't know if such a crate exists, but if it doesn't, that seems like a useful thing to write!The text was updated successfully, but these errors were encountered: