-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-13791][docs] Speed up sidenav by using group_by #9487
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
Conversation
…pages
Starting command tags with "{%-" will drop all whitespace to the left and ending
with "-%}" will drop all whitespace to the right (including newlines!).
Code like the following would otherwise create quite some unnecessary
whitespace:
{% if parent_id %}
{% assign parent_id = current[0].nav-parent_id %}
{% else %}
{% break %}
{% endif %}
Jekyll requires liquid and only optionally uses liquid-c if available. The latter uses natively-compiled code and reduces generation time by ~5% for me.
This seems to come with a much nicer code highlighting.
Jekyll requires sass but can optionally also use a C-based implementation provided by sassc. Although we do not use sass directly, there may be some indirect use inside jekyll. It doesn't seem to hurt to upgrade here.
./build_docs.sh -i previously did not only enable incremental documentation building while serving the docs, it also enabled a 'liveserve' mode that automatically reloaded pages in the browser when they changed. This is based on the 'hawkins' module which is not (yet) compatible with jekyll 4.0 which we need to (significantly) improve build times. This disables the liveserve mode and remove the hawkins module until a new version is available.
This significantly reduces the build times, on my machine from 140s to 47s!
_includes/sidenav.html parses through pages_by_language over and over again trying to find children when building the (recursive) side navigation. By doing this once with a group_by, we can gain considerable savings in building the docs via `./build_docs.sh` without any change to the generated HTML pages: before: ~54s after: ~37s
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit be58c37 (Mon Aug 26 11:14:31 UTC 2019) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
Looks good, merging this... |
_includes/sidenav.html parses through pages_by_language over and over again trying to find children when building the (recursive) side navigation. By doing this once with a group_by, we can gain considerable savings in building the docs via `./build_docs.sh` without any change to the generated HTML pages: This closes #9487
_includes/sidenav.html parses through pages_by_language over and over again trying to find children when building the (recursive) side navigation. By doing this once with a group_by, we can gain considerable savings in building the docs via `./build_docs.sh` without any change to the generated HTML pages: This closes #9487
_includes/sidenav.html parses through pages_by_language over and over again trying to find children when building the (recursive) side navigation. By doing this once with a group_by, we can gain considerable savings in building the docs via `./build_docs.sh` without any change to the generated HTML pages: This closes #9487
_includes/sidenav.html parses through pages_by_language over and over again trying to find children when building the (recursive) side navigation. By doing this once with a group_by, we can gain considerable savings in building the docs via `./build_docs.sh` without any change to the generated HTML pages: This closes #9487
What is the purpose of the change
_includes/sidenav.htmlparses throughpages_by_languageover and over again trying to find children when building the (recursive) side navigation. By doing this once with agroup_by, we can gain considerable savings in building the docs via./build_docs.shwithout any change to the generated HTML pages:before: ~54s
after: ~37s
Next PR in this series: #9489
Brief change log
Building on top of #9444, this PR adds:
group_byto create an easier-iterable array for determining page childrenVerifying this change
I verified the changes in the generated HTML pages (nothing changed).