Skip to content

9.9.0: Azure/GCS SDKs loaded for every storage driver add ~40 MB heap and ~10% CPU on streaming paths #295

Closed

Description

@chenrui333

9.9.0 regression from the Azure Blob driver (#280): lib/storage.ts imports @azure/storage-blob, @azure/identity and @google-cloud/storage at the top level, so every server loads all three SDKs whatever STORAGE_DRIVER is. That adds ~40 MB of live heap to an idle S3 or filesystem server, and every GC cycle walks it.

Branch: chenrui333:perf/lazy-storage-sdks (review copy). It is one commit on dev (6ae06c2). Each SDK is now imported inside its adapter's fromEnv, and only types stay as static imports. pnpm test:run passes with the filesystem, azblob and gcs drivers. Fork CI is green, and the Codex review found nothing.

As with #292, I can't open PRs here; see my comment there about cherry-picking.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions