Skip to content

perf: reduce number of errors thrown#12602

Merged
petebacondarwin merged 5 commits intomainfrom
yagiz/reduce-throws
Feb 19, 2026
Merged

perf: reduce number of errors thrown#12602
petebacondarwin merged 5 commits intomainfrom
yagiz/reduce-throws

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Feb 18, 2026

Optimize filesystem operations by using Node.js's throwIfNoEntry: false option

This reduces the number of system calls made when checking for file existence by avoiding the overhead of throwing and catching errors for missing paths. This is an internal performance optimization with no user-visible behavioral changes.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: Not changing behavior.
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: No visible behavioral change.

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@anonrig anonrig requested a review from a team as a code owner February 18, 2026 18:55
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 18, 2026

🦋 Changeset detected

Latest commit: 86de2aa

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Feb 18, 2026

Claude finished @anonrig's task —— View job


Changeset Review Complete

  • Read changeset guidelines
  • Read changeset file
  • Validate changeset content
  • Check for cute animal images
  • Post final review

⚠️ Issues found

The changeset .changeset/reduce-fs-errors.md has the following issue:

Title formatting: The title "Optimize filesystem operations by using Node.js's throwIfNoEntry: false option" should follow the conventional commit format or imperative style as shown in the guidelines. It currently reads more like a description than a changelog entry. Consider rephrasing to:

  • perf: optimize filesystem operations using throwIfNoEntry: false (conventional commit style), or
  • Optimize filesystem operations using throwIfNoEntry: false (imperative style without "by")

The use of backticks around throwIfNoEntry: false in the title may also cause formatting issues in the generated changelog.

Otherwise:

  • Version Type: patch is appropriate for an internal performance optimization
  • Changelog Quality: The description clearly explains what changed and why
  • Markdown Headers: No h1/h2/h3 headers present
  • Package Coverage: All affected packages are listed

Note: The image attached is not a cute animal, so no cuteness report is provided.

@anonrig anonrig force-pushed the yagiz/reduce-throws branch from c8ca5e6 to 53a29b4 Compare February 18, 2026 18:58
devin-ai-integration[bot]

This comment was marked as resolved.

@anonrig anonrig force-pushed the yagiz/reduce-throws branch from 53a29b4 to cc39a34 Compare February 18, 2026 19:04
@anonrig anonrig requested a review from a team as a code owner February 18, 2026 19:04
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 18, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12602

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12602

miniflare

npm i https://pkg.pr.new/miniflare@12602

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12602

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12602

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12602

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12602

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12602

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12602

wrangler

npm i https://pkg.pr.new/wrangler@12602

commit: 86de2aa

devin-ai-integration[bot]

This comment was marked as resolved.

@anonrig anonrig force-pushed the yagiz/reduce-throws branch 2 times, most recently from 03d9909 to f512174 Compare February 18, 2026 19:17
devin-ai-integration[bot]

This comment was marked as resolved.

@anonrig anonrig force-pushed the yagiz/reduce-throws branch 2 times, most recently from d4ebfd2 to 558e58d Compare February 18, 2026 19:22
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should just be using the isDirectory() helper from fs-helpers.ts throughout the code rather than lstatSync?

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Feb 18, 2026
@anonrig anonrig force-pushed the yagiz/reduce-throws branch from 46a54bd to 24a2b76 Compare February 18, 2026 21:14
devin-ai-integration[bot]

This comment was marked as resolved.

@petebacondarwin petebacondarwin merged commit 58a4020 into main Feb 19, 2026
40 of 41 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Feb 19, 2026
@petebacondarwin petebacondarwin deleted the yagiz/reduce-throws branch February 19, 2026 15:32
dario-piotrowicz added a commit that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants