Skip to content

chore: warm isolate pool#22

Merged
NathanFlurry merged 3 commits intomainfrom
nathan/warm-isolate-pool-v2
Mar 20, 2026
Merged

chore: warm isolate pool#22
NathanFlurry merged 3 commits intomainfrom
nathan/warm-isolate-pool-v2

Conversation

@NathanFlurry
Copy link
Member

Summary

  • Warm isolate pool: pre-creates V8 isolates so CreateSession grabs one instantly instead of paying cold-start cost
  • createNodeV8Runtime() wrapper in @secure-exec/node bakes in bridge code and warm pool defaults (pool of 3, 128MB heap)
  • Re-export createNodeV8Runtime, V8Runtime, NodeV8RuntimeOptions from secure-exec top-level — callers no longer need @secure-exec/v8 directly

Test plan

  • pnpm turbo check-types passes
  • pnpm turbo build passes
  • Cold start benchmark shows improvement with warm pool

NathanFlurry and others added 3 commits March 20, 2026 01:53
Add Init/InitReady IPC messages and a Rust-side warm pool in
SessionManager that pre-creates V8 isolates from the snapshot cache.
When createSession is called, a pre-warmed session is claimed (~2ms)
instead of cold-starting a thread + isolate (~6ms). Pool of 3 ensures
a warm session is always available under back-to-back creates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…m public API

createNodeV8Runtime() in @secure-exec/node bakes in bridge code and
warm pool defaults (pool of 3, 128MB heap). Callers no longer need to
import @secure-exec/v8 directly. Updated benchmarks, docs, and internal
refs to use the new wrapper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mports

Export createNodeV8Runtime and V8Runtime from the top-level secure-exec
package so consumers never need to import @secure-exec/v8 directly.
Updated benchmarks and docs to use the new exports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NathanFlurry NathanFlurry changed the title Warm isolate pool for near-zero cold start chore: warm isolate pool Mar 20, 2026
@NathanFlurry NathanFlurry merged commit b16ad36 into main Mar 20, 2026
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant