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
0.6.0 longer build time #1323
Comments
@rmoff Thanks – the reported issue is very helpful!
To locate the source of the increased build time for the Profiling it locally with v0.5.0 and 0.6.0, the overall build times correspond to what you reported: increasing from about 8.5 seconds to about 18.5 seconds! (As the site uses the Initially, I suspected your customised versions of Simply replacing: {% include nav.html pages=site.html_pages %} by {% include_cached nav.html pages=site.html_pages %} in your version of However, that is still an unexpected increase. And almost all the 11 seconds appeared to be for rendering the theme file Further profiling revealed that the remaining build time is almost entirely due to the two uses of Jekyll's
The CSS generated by In the meantime, assuming that visitors to the site always have JS enabled, there's a simple work-around for the current inefficiency of Footnotes |
Thanks @pdmosses, this is an amazing amount of detail and analysis :) Apologies for not specifying; the repo in question is https://github.com/treeverse/lakeFS/ (the rmoff version is a fork). |
Fix just-the-docs#1323 - Remove `_includes/head_nav.html`. - Generate page-independent SCSS in `assets/css/just-the-docs-head-nav.css`. - Link to `/assets/css/just-the-docs-head-nav.css` in `head.html`. - Disable the above stylesheet in `assets/js/just-the-docs.js`. - Generate page-dependent CSS in `_includes/css/activation.scss.liquid` and include in `head.html`.
I think I've found one, reducing the total build time for the lakeFS site to just 4 seconds (including page-dependent CSS for use when JS is disabled). It's available at https://github.com/pdmosses/just-the-docs/tree/fix-head-nav. However, it needs further testing before I submit a PR. |
We noticed that the sidebar was taking most of the time for our site with a lot of pages. So we just cut the build time by about 7x by caching the sidebar: |
Unfortunately, simply caching the sidebar affects the navigation. Switching to Jekyll 4 should provide a similar speedup without affecting the navigation. |
* Remove "passive" toggle PR #1244 introduced the "passive" toggle, but just-the-docs.js subsequently disabled the only styling that used it, so it became redundant. This removes it. * Reduce build time for page-dependent CSS Fix #1323 - Remove `_includes/head_nav.html`. - Generate page-independent SCSS in `assets/css/just-the-docs-head-nav.css`. - Link to `/assets/css/just-the-docs-head-nav.css` in `head.html`. - Disable the above stylesheet in `assets/js/just-the-docs.js`. - Generate page-dependent CSS in `_includes/css/activation.scss.liquid` and include in `head.html`. * No override svg rotate * Disable both stylesheets safely * Move the site nav to a new include - Fix the complete site nav - Move the site nav to `_includes/site_nav.html` - Cache the site nav - Uncache `nav.html` * Move nav and site_nav to _includes/components * Replace id prefix * Update breadcrumbs.html Replace several filters by a single loop through all the pages, but breaking as soon as possible. Profiling indicates that this saves up to 50% of the breadcrumbs build time for the filters. * Update just-the-docs-head-nav.css Adjust the number of lines to keep * Update head.html Remove superflous type. * Update activation.scss.liquid Remove a superfluous closing brace. Adjust layout. * Use `scssify` to remove nesting Preliminary profiling indicates that using `scssify` on the small number of nested CSS rules produced by `activation.scss.liquid` is quick enough. * Update head.scss Manual attempt at prettier (pending installation in Atom). * Avoid generation of nested CSS Local profiling indicated that using `scssify` on each page takes about 1% of the build time. - Update `_includes/css/activation.scss.liquid` to generate non-nested CSS. - Remove use of `scssify` from `_includes/head.html`. * Ignore false positives from validator Ignores: `:1.810-1.823: error: CSS: Parse Error.` and `:1.811-1.824: error: CSS: Parse Error.`; had to shift things around since the local config overrides the CI flag. * Inline `_sass/head.css` * Update CHANGELOG.md --------- Co-authored-by: Matthew Wang <matt@matthewwang.me>
Describe the bug
With 0.6.0 the build time doubles.
To Reproduce
0.5.0
0.6.0
Expected behavior
Build time should be the same (or quicker).
build --profile
0.5.0
0.6.0
Ruby version
Further diagnostics
Please let me know if there is any other useful information that I can provide.
The text was updated successfully, but these errors were encountered: