impl core::fmt::Write
for rustdoc::html::render::Buffer
#92563
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
I-compiletime
Issue: Problems and improvements with respect to compile times.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
A further performance improvement here would be to make sure that
Buffer
implscore::fmt::Write
, in which case we could userender_into(buf)
rather thanrender()
, avoiding the allocation of a temporaryString
here.Buffer
internally seems to just hold aString
and 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)
The text was updated successfully, but these errors were encountered: