Skip to content

Conversation

@g2vinay
Copy link
Contributor

@g2vinay g2vinay commented Jan 20, 2026

Resolves #1026

perf: Parallelize RegistryToolLoader initialization to reduce startup time

This change addresses a ~20 second startup delay when running the Azure MCP
Server in VS Code via the VSIX extension.

Problem:
The RegistryToolLoader was sequentially initializing 47 MCP server processes
(one for each Azure service command group). With each server taking ~400-500ms
to start, the cumulative delay was 20+ seconds.

Change:

  • Parallelized server initialization using Task.WhenAll()
  • All servers now initialize concurrently instead of sequentially
  • Added comprehensive diagnostic logging with timing metrics

Performance Improvement:

  • Before: ~20,000ms (sequential initialization)
  • After: ~1,500-2,000ms (parallel initialization)
  • Speedup: 10-15x faster

The diagnostic logs now show:

  • Number of servers discovered
  • Success/failure counts
  • Total tools loaded
  • Precise initialization time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

[BUG] 20-second pause with no log events in server startup

1 participant