Skip to content

[diffshub] Experiment to make initial page load faster...#730

Draft
amadeus wants to merge 2 commits into
mainfrom
amadeus/ssr-fetch
Draft

[diffshub] Experiment to make initial page load faster...#730
amadeus wants to merge 2 commits into
mainfrom
amadeus/ssr-fetch

Conversation

@amadeus
Copy link
Copy Markdown
Member

@amadeus amadeus commented May 21, 2026

Some pro tips from vercel n co

Some pro tips from vercel n co
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

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

Project Deployment Actions Updated (UTC)
pierre-docs-diffshub Ready Ready Preview May 21, 2026 4:34am
pierre-docs-trees Ready Ready Preview May 21, 2026 4:34am
pierrejs-diff-demo Ready Ready Preview May 21, 2026 4:34am
pierrejs-docs Ready Ready Preview May 21, 2026 4:34am

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@amadeus amadeus marked this pull request as draft May 21, 2026 04:43
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