Skip to content

perf(fmt): use tiny-readdir context - #206

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-readdir-context
Aug 5, 2026
Merged

perf(fmt): use tiny-readdir context#206
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-fmt-readdir-context

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Directory traversal currently reconstructs and tracks path metadata for every entry. This PR uses the Dirent context provided by tiny-readdir to read entry names and directory status directly, removing the auxiliary directory set and hot-path path.basename calls.

The isolated callback benchmark improved by about 88%, while end-to-end formatting time remained within normal run-to-run variance.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 986d031
Status: ✅  Deploy successful!
Preview URL: https://f8ea3d13.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-fmt-readdir.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit cfaead5 into main Aug 5, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-fmt-readdir-context branch August 5, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant