Skip to content

perf: reduce nitroApp.fetch() overhead#3699

Merged
pi0 merged 3 commits into
mainfrom
perf/std-fetch
Oct 29, 2025
Merged

perf: reduce nitroApp.fetch() overhead#3699
pi0 merged 3 commits into
mainfrom
perf/std-fetch

Conversation

@pi0
Copy link
Copy Markdown
Member

@pi0 pi0 commented Oct 29, 2025

Runtimes like Deno and Bun with { fetch } server support, always accept req: Request => Response | Promise<Response>, we can reduce internal overhead by removing isRequest and new Promise(res) overhead.

In order to preserve same DX, useNitroApp().request() can be used instead to pass a string and optional init options in second argument.

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nitro.build Ready Ready Preview Comment Oct 29, 2025 1:39pm

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Oct 29, 2025

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro@3699

commit: 8494f13

@pi0 pi0 merged commit 8a3a157 into main Oct 29, 2025
6 checks passed
@pi0 pi0 deleted the perf/std-fetch branch October 29, 2025 13:42
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