Skip to content

⚡Speed up extension activation #164

Merged
savannahostrowski merged 2 commits into
mainfrom
speed-up-activation
Jun 10, 2026
Merged

⚡Speed up extension activation #164
savannahostrowski merged 2 commits into
mainfrom
speed-up-activation

Conversation

@savannahostrowski

@savannahostrowski savannahostrowski commented Jun 10, 2026

Copy link
Copy Markdown
Member

Closes https://github.com/fastapilabs/cloud/issues/4097

This PR improves extension activation latency by:

  • Deferring Python/package version detection off the activation critical path (runs in the background; no longer awaited)
  • Parallelizing the discovery file scan (reads candidate .py files concurrently via p-map instead of one-at-a-time)

Note that discovery results are unchanged.

In local testing, the discovery file scan is ~5x faster (1.3s → 0.3s on a 3k-file workspace) and far faster on high-latency filesystems (large monorepos, WSL, etc). Combined with deferring version detection, this targets the activation tail seen in telemetry (p95 ≈ 60s, p99 in minutes).

@savannahostrowski savannahostrowski added this to the 2026-Q2 milestone Jun 10, 2026
@savannahostrowski savannahostrowski self-assigned this Jun 10, 2026
@savannahostrowski savannahostrowski merged commit fb3b77e into main Jun 10, 2026
11 checks passed
@savannahostrowski savannahostrowski deleted the speed-up-activation branch June 10, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant