conductor
conductor copied to clipboard
Performance improvements in Decider
Pull Request type
- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes (Please run
./gradlew generateLock saveLock
to refresh dependencies) - [ ] WHOSUSING.md
- [x] Other (please describe): Performance improvements
- Use the workflowModel loaded from the database at the start of the
decide()
method calls during recursion reducing the number of times workflow is loaded from database. - Improve check for workflowCompletion reducing the no. of times the tasks are evaluated which can be slow for large workflows
- Add a state inside DeciderOutcome to record if the workflow has a terminal task and capture the task to avoid checking later.
- Reduce and avoid extra recursion for the forks - which has proper nesting of fork/joins now if there are nested forks.
- Enable tests for the test-harness.
- Note: 2 tests which depends on the client changes are marked as @Ignore as they need to be updated with new client changes. These can be re-enabled.
With the above changes we have been able to measure marked performance improvements and reduced CPU load when running large workloads.
NOTE: Please remember to run ./gradlew spotlessApply
to fix any format violations.
Changes in this PR
Describe the new behavior from this PR, and why it's needed Issue #
Alternatives considered
Describe alternative implementation you have considered
@v1r3n The tests are fixed. You can rebase from main