-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc produces gigantic on-disk content in modules with large number of numerical constants #100952
Comments
So I think there are a few leads on how to address this:
|
I'm not sure tweaking the sidebar would accomplish much. The |
Related to rust-lang#100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
Providing some update about this part:
Actually, updating our CI script to not store the history on |
…block-short, r=GuillaumeGomez rustdoc: omit start/end tags for empty item description blocks Related to rust-lang#100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
…block-short, r=GuillaumeGomez rustdoc: omit start/end tags for empty item description blocks Related to rust-lang#100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
We have in Smithay some modules that define a large number of numerical constants (
const u32
), and this triggers a pathological edge-case in terms of documentation generation: rustdoc generates one 4.6 KB file for each of these constants.For example see this module: https://smithay.github.io/smithay/smithay/wayland/seat/keysyms/index.html
It contains something like ~2400 numerical constants, as a result the documentation folder for this module alone is 20 MB. We have a few other instances of this in Smithay, and we realized that because of this our
gh-pages
branches is more than 99% of the size of the github repo (the total size of thetarget/doc
folder for smithay and its public dependencies is around 220MB), and it significantly impacts clone and pull times for our contributors.We're going to take steps to mitigate this on our side, but I suppose maybe something can be done on rustdoc side as well?
cc @GuillaumeGomez who asked me to make this issue.
edit:
Giving more details on this, more generally the issues lies with modules that contain a large number of un-documented items (like functions or constants), like the ones generated by
gl_generator
for example.For such modules, rustdoc will create one file per item, with a constant 4.6KB overhead per file, while as a documentation reader this really does not bring anything useful given those pages do not contain any additional documentation beyond the symbol prototype.
The text was updated successfully, but these errors were encountered: