Stream: rustdoc

Topic: Speeding up get_blanket_impls


view this post on Zulip Joshua Nelson (Dec 16 2020 at 03:47):

So it turns out that rustdoc spends an absolutely inordinate amount of time on get_blanket_impls for stm32 crates https://github.com/rust-lang/rust/issues/79103#issuecomment-745737864

view this post on Zulip Joshua Nelson (Dec 16 2020 at 03:47):

@lcnr is there something obvious I can do to make this code faster? https://github.com/rust-lang/rust/blob/c00a4648a4cab9659a5712af457d07d42178c5e0/src/librustdoc/clean/blanket_impl.rs#L23

view this post on Zulip Joshua Nelson (Dec 16 2020 at 03:48):

hmm, maybe I could turn may_apply into a query?

view this post on Zulip Joshua Nelson (Dec 16 2020 at 03:48):

not sure if that's ever called with the same impl twice though - I don't think I'd expect it to be

view this post on Zulip lcnr (Dec 16 2020 at 07:46):

https://github.com/rust-lang/rust/blob/c00a4648a4cab9659a5712af457d07d42178c5e0/src/librustdoc/clean/blanket_impl.rs#L74

view this post on Zulip lcnr (Dec 16 2020 at 07:46):

would be interested in the logs of that

view this post on Zulip lcnr (Dec 16 2020 at 07:48):

ah, so the param env is the only think that changes between items here

view this post on Zulip lcnr (Dec 16 2020 at 07:54):

(and the value of T in an impl<T> Foo for T)

view this post on Zulip lcnr (Dec 16 2020 at 07:56):

so I don't see anything trivial to throw out here


Last updated: Oct 11 2021 at 22:34 UTC