FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: optimize HTML rendering by aduh95 · Pull Request #37301 · nodejs/node · GitHub

/ node Public

doc: optimize HTML rendering - #37301

Merged
aduh95 merged 1 commit into
nodejs:masterfrom
aduh95:doc-content-visibility
Feb 15, 2021
Merged

doc: optimize HTML rendering#37301
aduh95 merged 1 commit into
nodejs:masterfrom
aduh95:doc-content-visibility

Conversation

aduh95 commented Feb 9, 2021

Copy link
Copy Markdown
Contributor

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.

nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Feb 9, 2021
Comment thread tools/doc/html.js Outdated
Comment thread tools/doc/html.js Outdated

Copy link
Copy Markdown
Member

Should we use this syntax instead? I'm suggesting this based on the other functions in the file.

aduh95 added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 11, 2021

Copy link
Copy Markdown
Collaborator

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>
aduh95 force-pushed the doc-content-visibility branch from d226aca to 0177d4c Compare February 15, 2021 15:14

aduh95 commented Feb 15, 2021

Copy link
Copy Markdown
Contributor Author

Landed in 0177d4c

aduh95 merged commit 0177d4c into nodejs:master Feb 15, 2021
aduh95 deleted the doc-content-visibility branch February 15, 2021 15:15

Trott commented Feb 16, 2021

Copy link
Copy Markdown
Member

This change landed despite a failing Jenkins CI and now Jenkins is broken. This change breaks test/doctool/test-doctool-html.js.

Trott commented Feb 16, 2021

Copy link
Copy Markdown
Member

The fix appears to be just adding <section> tags to the expected results. Going to try to fix it now, but if someone beats me to it, great.

aduh95 commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

@Trott On it.

aduh95 commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

Isn't it weird the test failure is reported on for Windows CI?

Trott commented Feb 16, 2021

Copy link
Copy Markdown
Member

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.

aduh95 commented Feb 16, 2021

Copy link
Copy Markdown
Contributor Author

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.

aduh95 added a commit to aduh95/node that referenced this pull request Feb 16, 2021
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>
danielleadams pushed a commit that referenced this pull request Feb 16, 2021
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>
danielleadams pushed a commit that referenced this pull request Feb 16, 2021
Refs: #37301

PR-URL: #37397
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This was referenced Feb 16, 2021

Copy link
Copy Markdown

How were the 5000px calculated? (for intrinsic-size)
What happens if content gets larger than that?

aduh95 commented Feb 28, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

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.

What happens if content gets larger than that?

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.

targos pushed a commit that referenced this pull request May 1, 2021
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>
targos pushed a commit that referenced this pull request May 1, 2021
Refs: #37301

PR-URL: #37397
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams mentioned this pull request May 3, 2021
saltybuckets added a commit to saltybuckets/node that referenced this pull request Sep 25, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL