Sosuke Suzuki
|
8d8345a114
|
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>
|
2025-12-05 16:43:02 +09:00 |
|