@@ -24,17 +24,17 @@ platform.rs ← V8 Platform (singleton, once per process)
2424| ** Runtime** | ` runtime/mod.rs ` | V8 isolate + context + channels | New isolate |
2525| ** Worker** | ` worker.rs ` | High-level API around Runtime | New isolate/req |
2626| ** SharedIsolate** | ` shared_isolate.rs ` | Thread-local reusable isolate | Once/thread |
27- | ** ExecutionContext** | ` execution_context.rs ` | Disposable context | ~ 100µs |
27+ | ** ExecutionContext** | ` execution_context.rs ` | Disposable context | Fast ( ~ µs) |
2828| ** LockerManagedIsolate** | ` locker_managed_isolate.rs ` | Pool-compatible isolate | Once/worker |
2929| ** IsolatePool** | ` isolate_pool.rs ` | Global LRU cache | Manages lifecycle |
3030
3131## Execution Modes
3232
33- | Mode | API | Performance | Use Case |
34- | ----------------- | ------------------ | ----------- | -------------------- |
35- | ** Legacy** | ` Worker::new() ` | ~ 700µs /req | Max isolation, tests |
36- | ** Shared Pool** | ` execute_pooled() ` | ~ 200µs /req | Single-thread |
37- | ** Thread-Pinned** | ` execute_pinned() ` | ~ 170µs/req | ** Production** |
33+ | Mode | API | Performance | Use Case |
34+ | ----------------- | ------------------ | -------------- | -------------------- |
35+ | ** Legacy** | ` Worker::new() ` | Slow ( ~ ms /req) | Max isolation, tests |
36+ | ** Shared Pool** | ` execute_pooled() ` | Fast ( ~ µs /req) | Single-thread |
37+ | ** Thread-Pinned** | ` execute_pinned() ` | Fastest | ** Production** |
3838
3939See [ execution_modes.md] ( ./execution_modes.md ) for details.
4040
@@ -75,6 +75,7 @@ pub trait EventLoopRuntime {
7575 fn pump_and_checkpoint (& mut self );
7676}
7777
78+ // Implemented by Runtime and ExecutionContext
7879// Used by Worker, ExecutionContext, WorkerFuture
7980drain_and_process (cx , runtime , buffer ) -> Result <()>
8081```
@@ -132,15 +133,15 @@ Used by: Runtime Used by: IsolatePool
132133
133134## Key Files
134135
135- | File | Lines | Purpose |
136- | ---------------------- | ----- | ----------------------------- |
137- | ` runtime/mod.rs ` | ~ 800 | V8 setup, callback processing |
138- | ` runtime/bindings.rs ` | ~ 600 | JS native functions |
139- | ` worker.rs ` | ~ 700 | Worker API, event loop |
140- | ` execution_context.rs ` | ~ 500 | Pooled execution context |
141- | ` isolate_pool.rs ` | ~ 300 | LRU cache, v8::Locker |
142- | ` event_loop.rs ` | ~ 80 | Shared polling logic |
143- | ` platform.rs ` | ~ 20 | V8 platform singleton |
136+ | File | Lines | Purpose |
137+ | ----------------------- | - ----- | ----------------------------- |
138+ | ` runtime/mod.rs ` | ~ 700 | V8 setup, callback processing |
139+ | ` runtime/bindings/ ` | ~ 2500 | JS native functions (folder) |
140+ | ` worker.rs ` | ~ 1700 | Worker API, event loop |
141+ | ` execution_context.rs ` | ~ 1300 | Pooled execution context |
142+ | ` isolate_pool.rs ` | ~ 450 | LRU cache, v8::Locker |
143+ | ` event_loop.rs ` | ~ 80 | Shared polling logic |
144+ | ` platform.rs ` | ~ 80 | V8 platform singleton |
144145
145146## See Also
146147
0 commit comments