diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2025-05-21 22:01:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-21 22:01:41 +0000 |
| commit | a6e40fa9e90f6230fca2bc83c01dfaf02d840e84 (patch) | |
| tree | b067eff5643838a6360dd2d54b4e299edceae4e5 /tests/rustdoc-js-std/parser-weird-queries.js | |
| parent | 3da4c1033aa95d0c1a4310240295d49c6ef0d8fc (diff) | |
| parent | acff5d36cc4553bfb59a76d41e51020116ce4c6c (diff) | |
| download | rust-a6e40fa9e90f6230fca2bc83c01dfaf02d840e84.tar.gz rust-a6e40fa9e90f6230fca2bc83c01dfaf02d840e84.zip | |
[Perf] Optimize documentation lints **a lot** (1/2) (18% -> 10%) (#14693)
Turns out that `doc_markdown` uses a non-cheap rustdoc function to convert from markdown ranges into source spans. And it was using it a lot (about once every 17 lines of documentation on `tokio`, which ends up being about 2000 times). This ended up being about 18% of the total Clippy runtime as discovered by lintcheck --perf in docs-heavy crates. This PR optimizes one of the cases in which Clippy calls the function, and a future PR once pulldown-cmark/pulldown-cmark#1034 is merged will be opened. This PR lands the use of the function into the single-digit zone. Note that not all crates were affected by this crate equally, those with more docs are affected far more than those light ones. changelog:[`clippy::doc_markdown`] has been optimized by 50%
Diffstat (limited to 'tests/rustdoc-js-std/parser-weird-queries.js')
0 files changed, 0 insertions, 0 deletions
