Skip to content

0.4.0

Latest

Choose a tag to compare

@jahilldev jahilldev released this 14 Dec 22:26
· 4 commits to main since this release
bd52221

v0.4.0 - Recursive Loader Extraction & True Parallel Execution

🚀 Major Features

  • Loader Extraction: Build-time recursive discovery of entire component trees (including slot-based children)
  • Parallel Execution: All loaders execute simultaneously, even for deeply nested components (67-100% performance improvement)
  • Auto-Wrapper Pattern: Pages without loaders automatically extract child component loaders
  • Zero Waterfalls: Eliminates sequential async chains for both sibling and nested components

📊 Performance Improvements

  • Nested components: 67% faster (150ms → 50ms for 3-level nesting)
  • Sibling components: 67% faster (150ms → 50ms for 3 siblings)
  • Slot-based composition: 80% faster (250ms → 50ms for 5-level nesting)
  • Direct TTFB impact: Parallel execution eliminates waterfalls - 67-80% faster server processing in typical apps

🧪 Testing & Validation

  • 34 E2E tests validating parallel execution behaviour
  • Performance comparison tests demonstrating waterfall elimination
  • Zero-waste execution tests confirming only rendered component loaders execute

📚 Documentation

  • New PERFORMANCE.md: Comprehensive guide explaining TTFB reduction, performance improvements, best practices, and troubleshooting
  • Updated README.md: Enhanced examples, clarified recursive extraction, added automatic route skipping details
  • Updated CONTRIBUTING.md: E2E test fixture documentation, how to add test cases, debugging tips
  • Improved inline code comments: Better explanation of recursive extraction strategy

🛠️ Core Implementation Changes

  • Vite Plugin: Recursive AST traversal to discover entire component trees at build-time
  • Loader Extraction: Extracts loaders from nested children and injects into parent frontmatter
  • Orchestrator: Enhanced parallel execution with better logging and error handling
  • Registry: Improved deduplication and loader tracking per request

🔧 Infrastructure

  • Automatic route skipping: /_astro, /assets, /api routes bypass middleware
  • Better error messages: Clear feedback when middleware not configured
  • Improved TypeScript types: Better type inference for loader context
  • Cleaner test output: Formatted performance comparison displays with visual separators

🐛 Bug Fixes & Improvements

  • Fixed nested component loader execution (previously sequential)
  • Removed duplicate loader registration for extracted children
  • Improved component discovery for slot-based patterns
  • Better handling of conditional rendering