1
Fork 0

rustdoc: reference function signature types from the p array

This reduces the size of the function signature index, because
it's common to have many functions that operate on the same types.

    $ wc -c search-index-old.js search-index-new.js
    5224374 search-index-old.js
    3932314 search-index-new.js

By my math, this reduces the uncompressed size of the search index by 32%.
On compressed signatures, the wins are less drastic, a mere 8%:

    $ wc -c search-index-old.js.gz search-index-new.js.gz
    404532 search-index-old.js.gz
    371635 search-index-new.js.gz
This commit is contained in:
Michael Howell 2022-06-24 17:12:58 -07:00
parent fdca237d51
commit dc1fc08dc9
6 changed files with 245 additions and 133 deletions

View file

@ -753,7 +753,6 @@ impl FromWithTcx<ItemType> for ItemKind {
TraitAlias => ItemKind::TraitAlias,
ProcAttribute => ItemKind::ProcAttribute,
ProcDerive => ItemKind::ProcDerive,
Generic => unreachable!(),
}
}
}