rust/src/librustdoc
bors ced7cc5c65 Auto merge of #56090 - nnethercote:filesearch, r=eddyb
Overhaul `FileSearch` and `SearchPaths`

`FileSearch::search()` traverses one or more directories. For each
directory it generates a `Vec<PathBuf>` containing one element per file
in that directory.

In some benchmarks this occurs enough that the allocations done for the
`PathBuf`s are significant, and in practice a small number of
directories are being traversed over and over again. For example, when
compiling the `tokio-webpush-simple` benchmark, two directories are
traversed 58 times each. Each of these directories have more than 100
files.

We can do all the necessary traversals up front, when `Session` is created,
and get the `Vec<PathBuf>`s then.

This reduces instruction counts on several benchmarks by 1--5%.

r? @alexcrichton

CC @eddyb, @michaelwoerister, @nikomatsakis
2018-12-13 03:35:15 +00:00
..
clean fix intra-link resolution spans in block comments 2018-12-10 21:08:26 -05:00
html Rollup merge of #56633 - GuillaumeGomez:fix-right-arrow-display, r=QuietMisdreavus 2018-12-10 22:01:58 +01:00
passes fix intra-link resolution spans in block comments 2018-12-10 21:08:26 -05:00
Cargo.toml Update minifier version 2018-10-11 21:37:04 +02:00
config.rs Introduce SearchPath and replace SearchPaths with Vec<SearchPath>. 2018-12-12 10:36:15 +11:00
core.rs Introduce SearchPath and replace SearchPaths with Vec<SearchPath>. 2018-12-12 10:36:15 +11:00
doctree.rs add derive macros' helper attributes to doc output 2018-09-26 13:40:08 -05:00
externalfiles.rs add Debug impls for the Options structs 2018-11-04 16:39:24 -06:00
fold.rs shuffle ownership of external_traits 2018-09-20 05:54:26 -05:00
lib.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
markdown.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
test.rs Introduce SearchPath and replace SearchPaths with Vec<SearchPath>. 2018-12-12 10:36:15 +11:00
theme.rs use top level fs functions where appropriate 2018-12-07 12:54:11 -05:00
visit_ast.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
visit_lib.rs Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00

For more information about how librustdoc works, see the rustc guide.