Skip to content

Rustdoc shouldn't collect all attributes into a single string when parsing markdown #75669

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
jyn514 opened this issue Aug 18, 2020 · 1 comment
Labels
A-doctests Area: Documentation tests, run by rustdoc A-markdown-parsing Area: Markdown parsing for doc-comments C-optimization Category: An issue highlighting optimization opportunities or PRs implementing such I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-compiletime Issue: Problems and improvements with respect to compile times. S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 18, 2020

Unfortunately, the API seems pretty limited: https://docs.rs/pulldown-cmark/0.7.2/pulldown_cmark/struct.Parser.html

So until it's being extended, I guess we're kinda stuck with this extra allocation...

Originally posted by @GuillaumeGomez in #75665

@jyn514 jyn514 added A-doctests Area: Documentation tests, run by rustdoc S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/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. labels Aug 18, 2020
@GuillaumeGomez
Copy link
Member

To be checked but I *think* we could extend their API to allow them to take an iterator over char or something along the line.

@jyn514 jyn514 added the A-markdown-parsing Area: Markdown parsing for doc-comments label Nov 12, 2020
@workingjubilee workingjubilee added the C-optimization Category: An issue highlighting optimization opportunities or PRs implementing such label Feb 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc A-markdown-parsing Area: Markdown parsing for doc-comments C-optimization Category: An issue highlighting optimization opportunities or PRs implementing such I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-compiletime Issue: Problems and improvements with respect to compile times. S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: No status
Development

No branches or pull requests

4 participants