about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>2022-06-14 23:25:51 -0700
committerJacob Hoffman-Andrews <github@hoffman-andrews.com>2022-06-20 11:12:55 -0700
commit27dcebeb3e88b97420a6d8f9279102892e27c775 (patch)
tree9a81c2259a5f4132e88d9cc717c3ef7d7c81f2ff /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentbb8c2f41174caceec00c28bc6c5c20ae9f9a175c (diff)
downloadrust-27dcebeb3e88b97420a6d8f9279102892e27c775.tar.gz
rust-27dcebeb3e88b97420a6d8f9279102892e27c775.zip
Improve loading of crates.js and sidebar-items.js
Now that the "All Crates" dropdown is only rendered on the search results page,
there is no need to load crates.js on most pages. Load it only on crate pages.
Also, add the `defer` attribute so it does not block page rendering.

For sidebar-items.js, move the script tag to `<head>`. Since it already has the
defer attribute it won't block loading. The defer attribute does preserve
ordering between scripts, so instead of the callback on load, it can set a
global variable on load, which is slightly simpler. Also, since it is required
to finish rendering the page, beginning its load earlier is better.

Remove generation and handling of sidebar-vars. Everything there can be computed
with information available in JS via other means.

Remove the "other" wrapper in the sidebar. It was unnecessary.

Remove excess script fields
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions