Stream: rustdoc

Topic: render_item is now the slowest thing in rustdoc


view this post on Zulip Joshua Nelson (Aug 22 2021 at 00:37):

This is new!

> summarize summarize stm32f3-110131.mm_profdata
+-------------------------------------------------+-----------+-----------------+----------+------------+
| Item                                            | Self time | % of total time | Time     | Item count |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| render_item                                     | 8.56s     | 25.022          | 8.60s    | 18799      |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| get_blanket_impls                               | 3.16s     | 9.225           | 4.79s    | 14179      |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| get_auto_trait_impls                            | 3.07s     | 8.985           | 3.32s    | 14179      |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| expand_crate                                    | 2.07s     | 6.060           | 2.16s    | 1          |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| create_renderer                                 | 1.93s     | 5.637           | 1.93s    | 1          |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| evaluate_obligation                             | 1.89s     | 5.532           | 1.90s    | 352623     |
+-------------------------------------------------+-----------+-----------------+----------+------------+
| build_local_trait_impl                          | 1.01s     | 2.941           | 1.01s    | 155236     |
+-------------------------------------------------+-----------+-----------------+----------+------------+

view this post on Zulip Joshua Nelson (Aug 22 2021 at 00:37):

this is actually really good, render_item has the most room for improvement

view this post on Zulip Joshua Nelson (Aug 22 2021 at 00:38):

the others are hard to change

view this post on Zulip Joshua Nelson (Aug 22 2021 at 01:06):

memory usage looks about equally split between run_format and run_global_context
image.png

view this post on Zulip Noah Lev (Aug 22 2021 at 01:07):

I guess render is the slowest part of rustdoc after all ;)

view this post on Zulip Noah Lev (Aug 22 2021 at 01:22):

Do you have any measurements from compiling std or another crate? I know stmf32 is more of a stress test than an average, so I'm curious what the measurements are for more average crates.

view this post on Zulip Joshua Nelson (Aug 22 2021 at 01:23):

not on hand, but you could measure them with -Zself-profile pretty easily


Last updated: Oct 21 2021 at 20:03 UTC