ELSEIF
Your brief EB
1,504 stories from 222 feeds 1277 clusters Refreshed 39 minutes ago next pull 14:30

LANGUAGES Signal 124

Rustdoc filters trait impls before processing, cutting average wall time 25%

Illustration only Photo by Hunter Haley on Unsplash

A Rustdoc team member moved trait impl filtering ahead of the expensive build_impl calls, reducing average wall time by 25% (a 33% speedup) across the benchmark suite.

WHY IT MATTERS

Rustdoc was processing every trait impl across every dependency and discarding most of them afterward, making doc generation scale with the total impl count in the dependency graph rather than the relevant subset. Reordering the filter means documentation builds for crates with large dependency footprints should feel noticeably faster.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The build_extern_trait_impls pass previously called build_impl on every trait impl in every dependency, then filtered the results afterward.

02

Adapting the filtering logic to work on raw rustc_middle::ty data structures and running it before build_impl eliminated most redundant processing.

03

Wall-time reductions reached 40% on crates like hyper and bitmaps and 60% on microbenchmarks like helloworld.

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
noahlev.org via Lobsters How I made Rustdoc 33% faster in one week Open ↗