Bound concurrent filesystem reads during asset discovery and source ZIP generation
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- cli, performance
調査の方向性
packages/cli/src/util/AssetUploader.ts と packages/cli/src/util/getAppSourceZip.ts を読み、続いて既存のヘルパー mapAsyncWithMaxConcurrency() を調べます。ファイルシステムの読み取りだけを、たとえば 16 の並行性に制限し、トラバーサル、ZIP の内容、ハッシュ計算、ignore ルール、順序、アップロード、出力形式を維持します。
索引モデルが issue の本文から書いたものです。
説明
Summary
The Devvit CLI currently performs some filesystem reads with unbounded concurrency. For projects containing large numbers of assets or source files, this can result in hundreds or thousands of simultaneous readFile() operations.
While this is functionally correct, it can unnecessarily increase memory usage, file descriptor pressure, and disk contention.
Current behavior
Two areas currently read files with effectively unbounded concurrency:
-
packages/cli/src/util/AssetUploader.tsqueryAssets()usesPromise.all()to read every asset simultaneously.
-
packages/cli/src/util/getAppSourceZip.ts- Source files are added to the ZIP by launching all file reads at once before awaiting them.
Proposed solution
Reuse the existing mapAsyncWithMaxConcurrency() helper to limit concurrent filesystem reads to a reasonable maximum (for example, 16).
This keeps the implementation consistent with the rest of the repository while:
- reducing peak memory usage
- reducing file descriptor pressure
- improving behavior on slower disks and CI runners
- preserving parallelism
Importantly, this proposal only limits filesystem reads.
It does not change:
- upload concurrency
- ZIP contents
- hashing behavior
- ignore rules
- asset ordering
- output format
Benefits
- Lower peak resource usage
- Better scalability for repositories with many files
- More predictable performance across operating systems
- Minimal implementation risk
Implementation notes
A small, self-contained change would:
- replace the
Promise.all()asset reads inAssetUploader.ts - replace the unbounded ZIP source file reads in
getAppSourceZip.ts - reuse the existing
mapAsyncWithMaxConcurrency()utility - keep directory traversal behavior unchanged
This should be a low-risk performance improvement with no observable behavioral changes.
- 主要言語
- TypeScript
- スター
- 210
- フォーク
- 88
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reddit/devvit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
calcite-components needs triage refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Esri/calcite-design-system#15203 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
fullcalendar/fullcalendar#8106 ·