Problem
Changing a single parameter (e.g., threshold value) re-executes the entire graph, including unchanged upstream nodes. This is wasteful for 10+ node pipelines.
Proposal
Cache node outputs and only re-execute dirty nodes.
Design
- Add
Node::m_isDirty flag and Node::MarkDirty()
- Propagate dirty flag downstream when:
- Node parameter changes
- Input connection changes
- Upstream node is marked dirty
- Cache last output in
Node::m_cachedOutput
- Skip
Process() if !m_isDirty and cache exists
Memory Management
Add cache size limit (e.g., 500MB), LRU eviction.
Acceptance Criteria
- Graph with 10 nodes: changing last node param only re-executes last node
- Cache invalidates correctly when connections change
- Memory usage stays below limit
Problem
Changing a single parameter (e.g., threshold value) re-executes the entire graph, including unchanged upstream nodes. This is wasteful for 10+ node pipelines.
Proposal
Cache node outputs and only re-execute dirty nodes.
Design
Node::m_isDirtyflag andNode::MarkDirty()Node::m_cachedOutputProcess()if!m_isDirtyand cache existsMemory Management
Add cache size limit (e.g., 500MB), LRU eviction.
Acceptance Criteria