Repository navigation
perf(storage): load the Azure and GCS SDKs only when selected - #21
Closed
chenrui333 wants to merge 1 commit into
Closed
chenrui333 wants to merge 1 commit into
chenrui333 wants to merge 1 commit into
Conversation
`lib/storage.ts` imported `@azure/storage-blob`, `@azure/identity` and `@google-cloud/storage` at the top level, so every server loaded all three SDKs whatever `STORAGE_DRIVER` said. Since the Azure Blob driver (falcondev-oss#280) that adds about 40 MB of live heap to an idle S3 or filesystem server, and every GC cycle has to walk it. Import each SDK inside its adapter's `fromEnv`; only types stay as static imports. Signed-off-by: Rui Chen <rui@chenrui.dev>
Owner
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Owner
Author
|
Superseded by upstream v9.10.0 (falcondev-oss#296). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lib/storage.tsimports@azure/storage-blob,@azure/identityand@google-cloud/storageat the top level, so every server loads all three SDKs whateverSTORAGE_DRIVERis. Since the Azure Blob driver (falcondev-oss#280) that adds ~40 MB of live heap to an idle S3/filesystem server (nodejs_heap_size_used_bytesafter startup: 109 MB ondev, 68 MB with this change), and every GC cycle walks it.On streaming paths that shows up as CPU. Measured on a 9.9.0-based build (with the other changes from falcondev-oss#292–falcondev-oss#294), cold first restores of unmerged entries on S3 (RustFS, SQLite, one worker, real RS256 token validation, 3 interleaved reps) cost 0.096 CPU-s per hit with the eager imports vs 0.0835 with lazy imports (−13%), back to 9.8.0-level (0.0831).
Each SDK is now imported inside its adapter's
fromEnv; only types stay static.pnpm test:runpasses for filesystem, azblob and gcs.