Azure / azure-functions-durable-js

JavaScript library for using the Durable Functions bindings
https://www.npmjs.com/package/durable-functions
MIT License
131 stars 47 forks source link

Optimize / Simplify how the IsPlayed flag is updated for CompoundTasks #425

Open davidmrdavid opened 1 year ago

davidmrdavid commented 1 year ago

Follow up to: https://github.com/Azure/azure-functions-durable-js/pull/405/files#r1081924966

Our CompoundTasks have their result and isPlayed flag potentially set whenever their sub-tasks/children complete. When setting the isPlayed flag for these tasks, we're iterating over the entire set of sub-tasks, which in the extreme case may be too expensive. We should consider optimizing this logic to leverage the iterative execution style of DF.