diff options
| author | Michael Howell <michael@notriddle.com> | 2024-03-16 17:50:44 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2024-03-16 22:07:30 -0700 |
| commit | 5b44bfda7fc62b2874400e613672aefe5b49aaaa (patch) | |
| tree | 946f44cc9c9dabf91245c08b53fb4b50d9cf3376 /src/librustdoc/html/static/js/storage.js | |
| parent | 351890d682241e4eb9b8a63cddfb22e90567b870 (diff) | |
| download | rust-5b44bfda7fc62b2874400e613672aefe5b49aaaa.tar.gz rust-5b44bfda7fc62b2874400e613672aefe5b49aaaa.zip | |
rustdoc-search: shard the search result descriptions
The descriptions are, on almost all crates[^1], the majority
of the size of the search index, even though they aren't really
used for searching. This makes it relatively easy to separate
them into their own files.
This commit also bumps us to ES8. Out of the browsers we support,
all of them support async functions according to caniuse.
https://caniuse.com/async-functions
[^1]:
<https://microsoft.github.io/windows-docs-rs/>, a crate with
44MiB of pure names and no descriptions for them, is an outlier
and should not be counted.
Diffstat (limited to 'src/librustdoc/html/static/js/storage.js')
| -rw-r--r-- | src/librustdoc/html/static/js/storage.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/js/storage.js b/src/librustdoc/html/static/js/storage.js index bda7b3c647e..73c543567c0 100644 --- a/src/librustdoc/html/static/js/storage.js +++ b/src/librustdoc/html/static/js/storage.js @@ -211,14 +211,14 @@ function updateSidebarWidth() { if (desktopSidebarWidth && desktopSidebarWidth !== "null") { document.documentElement.style.setProperty( "--desktop-sidebar-width", - desktopSidebarWidth + "px" + desktopSidebarWidth + "px", ); } const srcSidebarWidth = getSettingValue("src-sidebar-width"); if (srcSidebarWidth && srcSidebarWidth !== "null") { document.documentElement.style.setProperty( "--src-sidebar-width", - srcSidebarWidth + "px" + srcSidebarWidth + "px", ); } } |
