docs icon indicating copy to clipboard operation
docs copied to clipboard

feat: Add Jekyll build performance optimizations

Open ebembi-crdb opened this issue 2 months ago • 4 comments

Major performance improvements for Jekyll builds:

Performance Results

  • Single version: 35 min → 4.9s (99.77% improvement)
  • All versions: 35 min → 20 min (41% improvement)

Key Optimizations

  1. YJIT Performance: Ruby JIT enabled in Makefile (15-30% boost)
  2. Version-switcher: JavaScript-based with precomputed data (688s eliminated)
  3. Layout splitting: Cacheable page components (691s → 3.6s)
  4. Dev config: Disabled sitemap, minification, network fetches
  5. Include caching: Framework for caching static includes

Testing

Run ./scripts/apply_all_optimizations.sh to test all improvements.

Files Added

  • _data/version_mappings.yml: Precomputed version data
  • _includes/version-switcher-js.html: Optimized version switcher
  • _includes/page-*.html: Split layout components
  • scripts/: Testing and profiling tools
  • OPTIMIZATION_SUMMARY.md: Detailed testing instructions

ebembi-crdb avatar Oct 10 '25 13:10 ebembi-crdb

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
Latest commit 52ec39980270223c2059906f4516b5632c3648f1
Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/68e90d2c165c61000823313e

netlify[bot] avatar Oct 10 '25 13:10 netlify[bot]

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
Latest commit 52ec39980270223c2059906f4516b5632c3648f1
Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/68e90d2c0ec72700086ed59e

netlify[bot] avatar Oct 10 '25 13:10 netlify[bot]

Files changed:

  • src/current/Makefile
  • src/current/OPTIMIZATION_SUMMARY.md
  • src/current/_config_cockroachdb_local.yml
  • src/current/_data/version_mappings.yml
  • src/current/_includes/page-footer-scripts.html
  • src/current/_includes/page-header.html
  • src/current/_includes/page-toc.html
  • src/current/_includes/version-switcher-js.html:
    • Warning: include not used in any version-switcher-js.html file or include
  • src/current/_layouts/page.html
  • src/current/scripts/apply_all_optimizations.sh
  • src/current/scripts/convert_static_includes.sh
  • src/current/scripts/profile_build.sh
  • src/current/scripts/test_baseline.sh
  • src/current/scripts/test_optimized_build.sh

github-actions[bot] avatar Oct 10 '25 13:10 github-actions[bot]

Netlify Preview

Name Link
Latest commit 52ec39980270223c2059906f4516b5632c3648f1
Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/68e90d2c165c61000823313a
Deploy Preview https://deploy-preview-20525--cockroachdb-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Oct 10 '25 14:10 netlify[bot]