Commit Graph

2 Commits

Author SHA1 Message Date
autofix-ci[bot]
792954ef9d [autofix.ci] apply automated fixes 2026-01-09 02:28:05 +00:00
Sosuke Suzuki
166ca6d5ad Implement ESM bytecode cache with module metadata serialization
Add BMES v3 format that stores module metadata (import/export entries,
variable declarations, code features) alongside bytecode. This enables
skipping the parsing phase for ES modules by reconstructing JSModuleRecord
directly from cached metadata.

Key changes:
- Add createModuleRecordFromCache() to reconstruct JSModuleRecord from cache
- Serialize/deserialize module metadata in BMES v3 format
- Add hasCachedModuleMetadata() virtual method to SourceProvider

Performance improvement for large bundles:
- ~200KB: break-even point
- 2MB bundle: +13% faster startup
- 10MB bundle: +11% faster startup
- 20MB bundle: +15% faster startup (65ms saved)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 02:26:20 +00:00