Bound concurrent filesystem reads#279
Open
CR29-22-2805 wants to merge 1 commit into
Open
Conversation
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.
Closes #278
💸 TL;DR
Bounds concurrent filesystem reads during CLI asset collection and source ZIP generation.
Large projects previously started a filesystem read for every discovered file at once. This change limits those reads to 16 concurrent operations, reducing the risk of excessive memory usage or file-descriptor exhaustion.
📜 Details
This PR applies the existing
mapAsyncWithMaxConcurrency()utility to two CLI filesystem operations:queryAssets()now limits concurrent asset reads to 16.getAppSourceZip()now defers source-file reads and processes them with a concurrency limit of 16.Directory traversal behavior remains unchanged. The source ZIP function continues to process directories serially after completing the bounded file reads for the current directory.
No public API behavior is changed.
Design Doc: N/A
Jira: N/A
🧪 Testing Steps / Validation
git diff --checksuccessfully.Promise.all()was replaced withmapAsyncWithMaxConcurrency().Promise.all(filePromises).A complete local dependency installation and test run could not be performed because the public repository references unpublished internal packages, including
devvit@0.13.9-devand@reddit/faceplate-ui.✅ Checks