Hypothesis
If we write an explicit interpreter for the composition language, the orchestrator will be more performant, and further performance-enhancing features will be easier to implement.
Reasoning
The current composition language is cumbersome and full of hacks. Scopes in particular rely on a highly inefficient hybrid implementation. It is also extremely difficult to reason about the code. By making the composition code simpler and easier to reason about (e.g., with more explicit abstractions and fewer magic variables being passed around), we will be able to avoid duplicate processing, thereby improving performance. By fixing the scope issue, we make it possible to implement things like memoization, which can further ameliorate performance issues.
Acceptance Criteria
- There is an alternate orchestration entry point that evaluates function calls.
- Stretch Goal: memoisation of function results in the orchestrator.S
Success Metrics
Alternate orchestration entry point passes the current entry point's test suite.
Orchestrator CPU usage decreases by 75%.
Orchestrator memory consumption decreases by 30% in the average case, showing less drastic GC spikes and no evidence of slow memory leaks.
Dependencies
N/A
Work Estimation
This is a massive chunk of work that will occupy most of the quarter.