Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`create_dir_all` performs a quadradic number of system calls

オープン
#51 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust

調査の方向性

まず、既存の cap-primitives mkdir と open_manually の実装を読み、次に新しいプリミティブを使用すべき cap-std と cap-async-std の create_dir_all ルーチンを調べます。コンポーネントの作成でディレクトリハンドルを使用し、ハンドルスタックで AlreadyExists と .. を処理し、より高レベルのルーチンがそれに委譲するようになれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

説明

good first 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 はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bytecodealliance/cap-std のほかの issue

bytecodealliance/cap-std の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。