Skip to content

sourcemaps upload sends files one at a time #860

Open

Description

@xavier-greenline

Is your feature request related to a problem? Please describe.
ldcli sourcemaps upload PUTs each file to its presigned URL in a sequential loop. Next.js server output has thousands of files, so the upload is dominated by request round trips. For our Next.js 16 app (3,474 files, 206 MB from .next/server), the upload takes 2 minutes inside our Vercel build and 6.5 minutes from a laptop.

Describe the solution you'd like
Upload a bounded number of files concurrently. get_source_map_upload_urls_ld already returns every presigned URL in one call, so only the PUT loop changes.

Describe alternatives you've considered

  • Running several ldcli processes on subdirectories: works, but needs a split per app and loses the single success/failure result.
  • Calling the GraphQL endpoint directly with our own uploader: it is undocumented, so we would rather fix the CLI.

Additional context
Measured from a laptop with the patch from #861 (2 runs each, same build output):

Concurrency .next/static (403 files, 54 MB) .next/server (3,474 files, 206 MB)
1 (v3.12.0) 55–57 s 389–394 s
4 14–17 s 103–106 s
8 10–11 s 59–61 s
16 7–9 s 37 s
32 (one run) 6 s 25 s

Activity

  1. changed the title [-]sourcemaps upload uploads files one at a time[/-] [+]`sourcemaps upload` sends files one at a time[/+] on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions