-
-
Notifications
You must be signed in to change notification settings - Fork 15k
impl core::fmt::Write for rustdoc::html::render::Buffer #92563
Copy link
Copy link
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-compilememIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to memory usage during compilation.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-compilememIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to memory usage during compilation.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
A further performance improvement here would be to make sure that
Bufferimplscore::fmt::Write, in which case we could userender_into(buf)rather thanrender(), avoiding the allocation of a temporaryStringhere.Bufferinternally seems to just hold aStringand it haswrite_str()andwrite_fmt()methods already, so perhaps it would make sense to implement that trait? I'm not sure how big/relevant the performance improvement would be.Originally posted by @djc in #92526 (comment)