You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My expectation is the prime offender here is the list of implementations. There are a lot on this page. With all the implementations collapsed, it's 51148px tall (in my browser). With them expanded, it's 650058px tall, or about 12x the height. And it takes a long time after expanding them before I can scroll to the end of the page.
I don't know how to test the speed of rendering the page if all the implementations start off collapsed, but I'm guessing it will be significantly faster.
I can think of two approaches to take here:
If there's more than a small number of implementations, start them collapsed by default. I don't know where the cutoff should be. It may also depend on the number of trait members as well (the fewer the trait members, the less "heavy" each new implementation is).
Add a rustdoc setting to just collapse trait implementations by default, and enable this setting by default.
Option (2) might actually be nice in general, because when I'm looking at trait implementations I'm usually trying to find a specific one, and having them all expanded makes that harder.
The text was updated successfully, but these errors were encountered:
sfackler
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Jan 2, 2019
Things are collapsed by default, the problem is just that the DOM is huge. Improvements are performed on this side. Also, we're thinking about reducing the number of information provided in foreign implementations.
@GuillaumeGomez I'm not sure that things are collapsed by default. I've just opened the latest nightly Iterator docs and and the entire list of Implementors is expanded. This is in Firefox 64 with cleared cookies and site data.
I just opened the Iterator doc page with Firefox 118.0.2 and it was pretty quick and smooth. The trait implements are collapsed by default. I also tried a couple of other big pages and did not notice any lag so I think this one could be considered resolved.
Rustdoc generates pages that can be large enough that they take a long time to render in a browser. Probably the worst offender is https://doc.rust-lang.org/std/iter/trait.Iterator.html.
My expectation is the prime offender here is the list of implementations. There are a lot on this page. With all the implementations collapsed, it's 51148px tall (in my browser). With them expanded, it's 650058px tall, or about 12x the height. And it takes a long time after expanding them before I can scroll to the end of the page.
I don't know how to test the speed of rendering the page if all the implementations start off collapsed, but I'm guessing it will be significantly faster.
I can think of two approaches to take here:
Option (2) might actually be nice in general, because when I'm looking at trait implementations I'm usually trying to find a specific one, and having them all expanded makes that harder.
The text was updated successfully, but these errors were encountered: