about summary refs log tree commit diff
path: root/src/librustdoc/html/layout.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-15 06:42:27 +0000
committerbors <bors@rust-lang.org>2018-12-15 06:42:27 +0000
commit7f04a646c68acb7f964e113d145f9bb28bfbb48a (patch)
treeed67ebe577135427dc2d74f893770806682fa2e2 /src/librustdoc/html/layout.rs
parent91857a3c82362c9572d280397001f02d86c416be (diff)
parentb8c1726f267ce24b773f04c7d161c62f6fbc05fb (diff)
downloadrust-7f04a646c68acb7f964e113d145f9bb28bfbb48a.tar.gz
rust-7f04a646c68acb7f964e113d145f9bb28bfbb48a.zip
Auto merge of #56005 - GuillaumeGomez:speedup-doc-render, r=QuietMisdreavus
Greatly improve rustdoc rendering speed issues

Fixes #55900.

So a few improvements here:

* we're switching to `DOMTokenList` API when available providing a replacement if it isn't (should only happen on safari and IE I think...)
* hide doc sections by default to allow the whole HTML generation to happen in the background to avoid triggering DOM redraw all the times (which killed the performances)

r? @QuietMisdreavus
Diffstat (limited to 'src/librustdoc/html/layout.rs')
-rw-r--r--src/librustdoc/html/layout.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs
index 6ce02c313ee..37ff693bdf1 100644
--- a/src/librustdoc/html/layout.rs
+++ b/src/librustdoc/html/layout.rs
@@ -54,6 +54,7 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
     <link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}light{suffix}.css\" \
           id=\"themeStyle\">\
     <script src=\"{root_path}storage{suffix}.js\"></script>\
+    <noscript><link rel=\"stylesheet\" href=\"{root_path}noscript{suffix}.css\"></noscript>\
     {css_extension}\
     {favicon}\
     {in_header}\