-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Reduce right-side DOM size #100956
Reduce right-side DOM size #100956
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha A change occurred in the Ayu theme. cc @Cldfire |
995586a
to
38eb33b
Compare
Fix the bad double call and extended GUI tests. |
@bors r+ |
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#95005 (BTree: evaluate static type-related check at compile time) - rust-lang#99742 (Add comments about stdout locking) - rust-lang#100128 (Document that `RawWakerVTable` functions must be thread-safe.) - rust-lang#100956 (Reduce right-side DOM size) - rust-lang#101006 (Fix doc cfg on reexports) - rust-lang#101012 (rustdoc: remove unused CSS for `.variants_table`) - rust-lang#101023 (rustdoc: remove `type="text/css"` from stylesheet links) - rust-lang#101031 (Remove unused build dependency) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #101037) made this pull request unmergeable. Please resolve the merge conflicts. |
Doc size wins from the rollup where this PR was merged (probably coming mostly from this PR): https://perf.rust-lang.org/compare.html?start=8a13871b69924b74cfa1d737f2894068b37ea7ea&end=42fa8ac7236f4f78a82aeea543bdd445a59f02e0&stat=size%3Adoc_bytes |
This is another follow-up of #100429 but not in code blocks this time.
So the idea is: if there is only one element in the
.rightside
element, there is no need to wrap it, we can just create one node.On each page, I run this JS:
document.getElementsByTagName('*').length
. Important to note: the bigger the number of elements inside the page, the greater the gain. It also doesn't work very nicely on std docs because there are a lot of version annotations. So with this PR, It allows to get the following results:You can test it here.
r? @notriddle