Skip to content

[model-gateway] Optimize workflow engine with pre-computed dependency graph#15503

Merged
slin1237 merged 1 commit intomainfrom
wfaas-opt-n/1
Dec 19, 2025
Merged

[model-gateway] Optimize workflow engine with pre-computed dependency graph#15503
slin1237 merged 1 commit intomainfrom
wfaas-opt-n/1

Conversation

@slin1237
Copy link
Copy Markdown
Collaborator

  • Add reverse_deps and initial_step_indices to WorkflowDefinition
  • Build dependency graph during validate() (O(N+E) once at registration)
  • Replace O(N²) step scanning with event-driven readiness checking
  • Use VecDeque to track only steps whose dependencies just completed
  • Add get_dependent_indices() and get_initial_step_indices() for O(1) lookup
  • Remove unused get_dependents() method

Checklist

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

… graph

- Add reverse_deps and initial_step_indices to WorkflowDefinition
- Build dependency graph during validate() (O(N+E) once at registration)
- Replace O(N²) step scanning with event-driven readiness checking
- Use VecDeque to track only steps whose dependencies just completed
- Add get_dependent_indices() and get_initial_step_indices() for O(1) lookup
- Remove unused get_dependents() method
@slin1237 slin1237 merged commit 0adfc42 into main Dec 19, 2025
51 of 53 checks passed
@slin1237 slin1237 deleted the wfaas-opt-n/1 branch December 19, 2025 23:44
Prozac614 pushed a commit to Prozac614/sglang that referenced this pull request Dec 23, 2025
jiaming1130 pushed a commit to zhuyijie88/sglang that referenced this pull request Dec 25, 2025
YChange01 pushed a commit to YChange01/sglang that referenced this pull request Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant