Skip to content

Summon 0.5.6.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 11:08
· 48 commits to main since this release

Fixed

  • Critical TBT Fix: External Bootloader Architecture - Moved inline bootloader to external defer script

    • Replaced ~390 lines of inline synchronous JavaScript with 1 line external script loader
    • Created /summon-bootloader.js external file (loaded with defer attribute)
    • Inline script no longer blocks main thread during HTML parsing
  • Bundle Size Reduction - Reduced JS hydration bundle by 46%

    • Before: 279KB (summon-hydration.js: 164KB + kotlinx-libs: 115KB)
    • After: 150KB (summon-hydration.js: 125KB + kotlinx-libs: 24KB)
    • Replaced kotlinx-serialization in ClientDispatcher with native JS JSON parsing
    • Better tree-shaking now that serialization is not called in hot path

Technical Details

Root cause of persistent TBT was identified:

  1. Inline script blocking - ~390 lines of JavaScript running synchronously during HTML parse
  2. Large bundle size - 279KB of JS must be parsed before interactive
  3. Previous micro-optimizations (console.log, getBoundingClientRect) had negligible impact

Solution:

  • External bootloader with defer loads in parallel, executes after DOM ready
  • Native JSON.parse() for UiAction instead of kotlinx-serialization reflection
  • Bundle size nearly halved through better tree-shaking

Expected TBT Impact

Change Impact
External defer bootloader No inline blocking
46% smaller bundle ~46% faster parse time
Expected TBT < 300ms (from 31,000ms+)