-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
doc: optimize HTML rendering #37301
doc: optimize HTML rendering #37301
Conversation
Should we use this syntax instead? I'm suggesting this based on the other functions in the file. |
Defer rendering sections of docs until they are displayed on the user's screen. PR-URL: nodejs#37301 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
d226aca
to
0177d4c
Compare
Landed in 0177d4c |
This change landed despite a failing Jenkins CI and now Jenkins is broken. This change breaks test/doctool/test-doctool-html.js. |
The fix appears to be just adding |
@Trott On it. |
Isn't it weird the test failure is reported on for Windows CI? |
I guess we're only running doctool there? I don't know, that is surprising. |
Attempt to fix that in #37398. |
Refs: nodejs#37301 PR-URL: nodejs#37397 Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Defer rendering sections of docs until they are displayed on the user's screen. PR-URL: #37301 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
How were the 5000px calculated? (for intrinsic-size) |
It wasn't calculated, it's just a random value which is supposed to be greater than the user screen height.
Nothing – until the user scrolls near the supposed element position, and the browser will have to render the actual content. The only (I think) visible consequence is the scroll bar doing some weird jumps when scrolling (and the much improved render time of course). You can already check how it performs by visiting https://nodejs.org/api/all.html. |
Defer rendering sections of docs until they are displayed on the user's screen. PR-URL: #37301 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This pr fixes the jittery scrolling behavior introduced in nodejs#37301 fix:nodejs#40099 refs:https://infrequently.org/2020/12/resize-resilient-deferred-rendering/
Defer rendering sections of docs until they are displayed on the user's screen.
Rendering+painting time of
all.html
on master is~1min
on my machine:Rendering+painting time of
all.html
on this branch is~1s
on my machine:This feature is only available for Chromium browsers using version 85+ (https://caniuse.com/?search=content%20visibility), and won't change much for other browsers.