Skip to content

perf(light-base): pre-compile cached parachain runtime during DB load #3221

@replghost

Description

@replghost

Summary

On warm start with cached runtime code (#3214), the sequence is:

  1. Load DB → decode runtime code bytes
  2. Start services (NetworkService, SyncService, RuntimeService)
  3. Reach parachain Phase 2 → compile cached WASM (~200-300ms)

Compilation is pure CPU — it doesn't need network state or any service. Start compiling the moment the DB is decoded, before services are created. By the time Phase 2 runs, the compiled VM is ready.

Removes ~200-300ms from the critical path on every warm start.

Depends on

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions