Commit graph

6 commits

Author SHA1 Message Date
George Kalpakas
bdefeb1f11 perf(docs-infra): reduce unnecessary whitespace in API docs (#43435)
The HTML for the docs pages is generated by Dgeni based on some
[Nunjucks][1] templates.

Previously, these templates were set up in a way that introduced a lot
excess whitespace in the generated HTML, unnecessarily bloating the
corresponding JSON files that need to be downloaded in order to view a
certain docs page. This has been discussed in #28105 and was again
observed while investigating #43285.

This commit refactors some of the templates related to API docs (which
seem to be the most affected ones) to drastically reduce the amount of
excess whitespace. More specifically, the total size of all files in
`generated/docs/api/` was reduced from ~13MB to ~7MB.

Besides the reduced payload size for each API page, this change will
also reduce the amount of memory needed by the ServiceWorker to cache
the API pages that have been visited by a user.

NOTE:
The affected files are not eagerly downloaded when navigating to
angular.io. Instead, each file is downloaded individually, as soon as a
user visits the corresponding API docs page. Therefore, the impact of
this change will be relatively small for most users.

[1]: https://mozilla.github.io/nunjucks/

PR Close #43435
2021-09-14 08:29:50 -07:00
ajitsinghkaler
c0869ecfb3 fix(docs-infra): add deprecated-api-item class to remaining deprecated items (#34192)
Fixes #31455

PR Close #34192
2019-12-05 10:12:11 -08:00
George Kalpakas
b2e902deb4 fix(aio): fix code highlight in API docs templates (#21630)
Fixes #21108

PR Close #21630
2018-01-19 13:23:41 -08:00
Peter Bacon Darwin
39386eadea build(aio): do not render comments in decorators
Closes #18873
2017-09-12 13:52:02 -04:00
Peter Bacon Darwin
a301dba68f build(aio): improve API docs layout and styling 2017-07-13 12:16:20 -07:00
Peter Bacon Darwin
b051d7ff48 build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00