doc: optimize HTML 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.