diff options
| author | bors <bors@rust-lang.org> | 2021-11-14 08:57:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-14 08:57:27 +0000 |
| commit | 6d387431e5457a9a3e185dc27b8416b6fcd78c88 (patch) | |
| tree | c44f15ed7bf4d32d167ad26b38727439bba9d407 | |
| parent | f820d9d4e5af7d298ffdc3145b48e206b65e8e28 (diff) | |
| parent | 6b3695d480cfb6f61f59df1184239e16dc1c6795 (diff) | |
| download | rust-6d387431e5457a9a3e185dc27b8416b6fcd78c88.tar.gz rust-6d387431e5457a9a3e185dc27b8416b6fcd78c88.zip | |
Auto merge of #90757 - GuillaumeGomez:search-index-performance, r=camelid
Remove unneeded FIXMEs comments in search index generation Original comment: > Instead of recreating a new `vec` for each arguments, we re-use the same. The impact on performance should be minor but worth a try. After testing it, we reached the conclusion that the code readability drop wasn't worth the almost unnoticeable performance improvement. r? `@camelid`
| -rw-r--r-- | src/librustdoc/html/render/cache.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs index 9164916af09..0286d2a4c81 100644 --- a/src/librustdoc/html/render/cache.rs +++ b/src/librustdoc/html/render/cache.rs @@ -408,13 +408,9 @@ crate fn get_all_types<'tcx>( if arg.type_.is_self_type() { continue; } - // FIXME: performance wise, it'd be much better to move `args` declaration outside of the - // loop and replace this line with `args.clear()`. let mut args = Vec::new(); get_real_types(generics, &arg.type_, tcx, 0, &mut args, cache); if !args.is_empty() { - // FIXME: once back to performance improvements, replace this line with: - // `all_types.extend(args.drain(..));`. all_types.extend(args); } else { if let Some(kind) = arg.type_.def_id_no_primitives().map(|did| tcx.def_kind(did).into()) |
