`create_dir_all` performs a quadradic number of system calls
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
まず、既存の cap-primitives mkdir と open_manually の実装を読み、次に新しいプリミティブを使用すべき cap-std と cap-async-std の create_dir_all ルーチンを調べます。コンポーネントの作成でディレクトリハンドルを使用し、ハンドルスタックで AlreadyExists と .. を処理し、より高レベルのルーチンがそれに委譲するようになれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
create_dir_all uses the algorithm from libstd for recursively creating all components. However, cap-primitives' mkdir function performs a system call per path component per call, so calling it once per path component leads to a quadratic number of system calls.
We should add a create_dir_all function in cap-primitives which, for each path component, creates a directory for that component (ignoring a io::ErrorKind::AlreadyExists error), opens the newly created directory, and then uses the resulting handle as the base for handling the next component.
Similar to open_manually, it should handle .. components by keeping a stack of handles as it goes, so that it can simply pop an entry from that stack to ascend to the parent.
And then, the cap-std and cap-async-std create_dir_all routines can use it.
- 主要言語
- Rust
- スター
- 821
- フォーク
- 59
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/cap-std のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
bytecodealliance/cap-std#427 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
bytecodealliance/cap-std#416 · コメント 2 件 ·
-
Archiving cap-std オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
bytecodealliance/cap-std#426 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
bytecodealliance/cap-std#423 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
bytecodealliance/cap-std#408 · コメント 4 件 · リアクション 2 件 ·
bytecodealliance/cap-std の issue をすべて見る
似ている issue
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rocky-data/rocky#2181 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. オープンbot:ai-assisted component:indexer QA-roadmap status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
midnightntwrk/midnight-indexer#1557 ·