-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
enhancementNew feature or requestNew feature or requestkotlinAffects the Kotlin library.Affects the Kotlin library.
Description
Currently we do two tree traversals per render pass:
- Render: Generate renderings, create new child workflows/workers, tear down old ones.
- Tick: Recursively select on all workers and event channels.
We should be able to reduce this to a single pass:
- Wrap the render pass in a
select
, and pass theSelectBuilder
down through all therender
calls. WorkflowNode.runningWorker
adds each worker to theSelectBuilder
as soon as it's ran.WorkflowNode.renderWithStateType
adds its event channel to theSelectBuilder
before returning.- Once the root
render
call returns,offer
the rendering to the rendering channel (it's conflated so no need tosend
). - When the
select
returns,send
the output to the output channel if non-null.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestkotlinAffects the Kotlin library.Affects the Kotlin library.