Skip to content

Conversation

ebembi-crdb
Copy link
Contributor

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

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 ebembi-crdb requested a review from a team as a code owner October 10, 2025 13:42
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for cockroachdb-api-docs canceled.

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

Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

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

Copy link

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

Copy link

netlify bot commented Oct 10, 2025

Netlify Preview

Name Link
🔨 Latest commit 52ec399
🔍 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant