[diffshub] Experiment to make initial page load faster...#730
Conversation
Some pro tips from vercel n co
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ff5bfe3c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| const response = await createDiffshubPatchResponse( | ||
| input, | ||
| new AbortController().signal |
There was a problem hiding this comment.
Wire initial patch fetch to caller abort signal
loadInitialDiffshubPatchResponse creates a fresh AbortController and passes its never-aborted signal into createDiffshubPatchResponse, so the upstream diff download keeps running even if the page request is canceled (client disconnect, interrupted navigation, dropped prefetch). On large diffs this can waste substantial bandwidth/CPU and tie up server resources, whereas the API route path correctly uses request.signal for cancellation.
Useful? React with 👍 / 👎.
Some pro tips from vercel n co