Skip to content

Dynamic engine uses sync create_node — no ResourceManager support #288

@staging-devin-ai-integration

Description

Problem

The dynamic engine actor (crates/engine/src/dynamic_actor.rs) calls registry.create_node() (the synchronous version) inside spawn_blocking. The registry also has create_node_async (crates/core/src/registry.rs:332) which supports the ResourceManager for shared resource caching (e.g., ML models shared across multiple node instances).

Impact

Nodes created via the dynamic engine cannot benefit from shared resource management. Each node instance loads its own copy of resources (e.g., ONNX models), increasing memory usage.

Suggested fix

Switch from create_node inside spawn_blocking to create_node_async inside a regular tokio::spawn. Since create_node_async is async, it cannot run inside spawn_blocking. The FFI blocking concern would need to be handled differently — possibly by having create_node_async internally use spawn_blocking for the synchronous factory call while keeping the resource acquisition async.

Context

Pre-existing limitation identified during review of PR #286 (async AddNode). The old synchronous code also used create_node, not create_node_async.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions