CRITICAL ARCHITECTURAL FIX: - Change node-worker strategy to node-direct for ONNX compatibility - Use single model instance on main thread instead of worker pool - Prevents HandleScope V8 API locking errors in Node.js 22/24 - Reduces memory usage from 360MB+ to ~90MB (single model vs 4 workers) - Maintains async operations using native transformers.js capabilities Root Cause: ONNX runtime cannot properly handle V8 isolate context switching between worker threads, causing fatal HandleScope errors. Solution: Keep ONNX operations in main V8 isolate while preserving all existing async functionality and performance. Tested: Multiple concurrent addNoun operations work without errors. |
||
|---|---|---|
| .. | ||
| lightweight-embedder.ts | ||
| model-manager.ts | ||
| universal-memory-manager.ts | ||
| worker-embedding.ts | ||
| worker-manager.ts | ||