-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
In cmd/run.go:248–271 (fetchGraphWithCircularDeps) and internal/api/client.go:414–467, GetGraph and GetCircularDependencies are called sequentially:
graph, err := client.GetGraph(ctx, projectName, repoZip) // uploads zip, polls ~10-15 min
circDeps, err := client.GetCircularDependencies(ctx, projectName, repoZip) // uploads zip again, polls againThe two calls are completely independent — neither depends on the other's result. Running them back-to-back means:
- The repo zip (up to 10 MB) is uploaded twice over the network.
- Total wall-clock time is
time(GetGraph) + time(GetCircularDeps)instead ofmax(time(GetGraph), time(GetCircularDeps)).
Fix
Run both calls concurrently using goroutines and a sync.WaitGroup (or errgroup). Collect results from both, then merge circDeps into graph.Stats.CircularDependencyCycles exactly as today.
This would roughly halve the total time spent waiting for the API on a cache miss.
Relevant files:
cmd/run.go:248–271—fetchGraphWithCircularDepsinternal/api/client.go:414–467—GetGraph/GetCircularDependencies
@claude please implement this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request