Rollup merge of #83835 - notriddle:sort-index, r=ollie27
rustdoc: sort search index items for compression
This should not affect the appearance of the docs pages themselves.
This makes the pre-compressed search index smaller, thanks to the
empty-string path duplication format, and also the gzipped version,
by giving the algorithm more structure to work with.
rust$ wc -c search-index-old.js search-index-new.js
2628334 search-index-old.js
2586181 search-index-new.js
5214515 total
rust$ gzip search-index-*
rust$ wc -c search-index-old.js.gz search-index-new.js.gz
239486 search-index-old.js.gz
237386 search-index-new.js.gz
476872 total
This commit is contained in:
@@ -164,6 +164,7 @@ crate struct IndexItem {
|
||||
crate parent: Option<DefId>,
|
||||
crate parent_idx: Option<usize>,
|
||||
crate search_type: Option<IndexItemFunctionType>,
|
||||
crate aliases: Box<[String]>,
|
||||
}
|
||||
|
||||
/// A type used for the search index.
|
||||
|
||||
Reference in New Issue
Block a user