Skip to content

perf(orchestration): analyze() runs toposort 3-4x — refactor classify() to accept pre-computed values #2236

@bug-ops

Description

@bug-ops

Context

PR #2235 added TopologyClassifier::analyze() that calls compute_longest_path_and_depths once, then calls classify() which internally calls it again (twice). Total: 3-4 toposort passes per analysis instead of the intended O(|V|+|E|) single pass.

Fix

Refactor classify() to accept pre-computed (longest_path, depths) values from the caller. analyze() computes once and passes to classify().

Impact

Performance only — no correctness issue. Matters for large task graphs (50+ nodes).

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexityenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions