Skip to content

Conversation

@ognjenkatic
Copy link
Collaborator

There is an issue with polling - when there are multiple instances of the same task scheduled, they are polled one at a time, with delays in between. This PR adds an IExecutionManager interface (previously there was only the class ExecutionManager) to allow for registering alternate implementations. The PR also adds one such implementation, one which handles the issue of multiple polls of the same task type. We would not like to force this upon users for now, instead an extension method can be used to utilize it:

.AddExecutionManager(...)
.UseBetaExecutionManager();

@ognjenkatic
Copy link
Collaborator Author

This attempts to improve scenarios where there is a large number of tasks of the same type scheduled in a short time span, for example forking X number of the same task. Bare bones tests show that a workflow having a lightweight task forked to 300 instances drops from 1min 40sec to 4sec in execution. This is a very extreme case, but could be representative for some use cases.

@ognjenkatic ognjenkatic requested a review from boma96 May 3, 2025 21:13
@ognjenkatic ognjenkatic merged commit 3b16608 into master May 3, 2025
1 check passed
@ognjenkatic ognjenkatic deleted the feat/main/polling-same-task-multiple-times branch May 3, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants