Skip to content

Conversation

@sergical
Copy link
Member

DESCRIBE YOUR PR

Fix alternating slow/fast production build times (~19 min vs ~12 min) by parallelizing R2 uploads in the md-exports child-listings phase.

Root cause: The child-listings phase in scripts/generate-md-exports.mjs uploads ~1651 section index files to R2 sequentially — one await uploadToCFR2() at a time inside a for...of loop. At ~300ms per R2 request, this adds ~8 minutes to every other production build.

Fix: Collect uploads during the loop, then batch them with pLimit(50) (already imported in the file). This reduces the upload phase from ~8 min to ~10-20 seconds.

  • Moved R2 upload out of the sequential loop into a parallel batch
  • Used pLimit(50) for concurrency control (same pattern as cache cleanup)
  • Added log message showing number of uploaded section index files

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

🤖 Generated with Claude Code

The child-listings phase uploaded ~1651 section index files to R2
sequentially (one await per file inside a for...of loop). At ~300ms
per request, this added ~8 minutes to every other production build,
causing an alternating SLOW/FAST pattern (19 min vs 12 min).

Collect uploads during the loop and batch them with pLimit(50),
reducing the upload phase from ~8 min to ~10-20 seconds.

Co-Authored-By: Claude <[email protected]>
@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Feb 11, 2026 8:10pm
sentry-docs Ready Ready Preview, Comment Feb 11, 2026 8:10pm

Request Review

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