Latest Results
perf: revert prepareResponse centralization to avoid extra await on hot path
The prepareResponse centralization in 32cec38a3a made BaseApp.render
async-await the fetchHandler response to call prepareResponse before
returning, replacing the simple 'return this.#fetchHandler.fetch(request)'
promise pass-through. The extra await created a microtask hop on every
request that showed up on CodSpeed after the log-centralization revert
was already applied.
Move prepareResponse back into the handlers that produce final responses:
- BaseApp.render: back to returning the fetchHandler promise directly
for the happy path, or the renderError promise for the locals-invalid
path. No intermediate await.
- AstroHandler.render: prepareResponse called at the redirect
short-circuit and at the end of the normal render.
- TrailingSlashHandler.handle: prepareResponse called on the redirect
response; addCookieHeader read from getRenderOptions(request).
- DefaultErrorHandler.renderError: prepareResponse called at all three
return sites (prerendered error fetch, middleware render, fallback).
Kept from the earlier commits: the generic type tightening on
DefaultFetchHandler, AstroHandler, and TrailingSlashHandler. Those are
type-level only and don't affect runtime.
All tests green: build, 2344 unit, 4 redirects, 15 middleware, 13
rewrite, 26 actions, lint:ci. Latest Branches
-1%
gllmt:dev/fix-cache-provider-waituntil 0%
okxint:fix/style-case-sensitivity -1%
fkatsuhiro:fix/astro-image-position-prop-bug © 2026 CodSpeed Technology