Parallel server action calls #69265
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Parallel & Intercepting Routes
Related to Parallel and/or Intercepting routes.
Performance
Anything with regards to Next.js performance.
Link to the code that reproduces this issue
https://github.com/yehonatanyosefi/parallel-routes-example
To Reproduce
Current vs. Expected behavior
Current behavior of nextjs server actions are they are executed in sequential fashion, however there is no flag or option or a config to let them be executed in parallel. Causing them to block some ux. For example for ai image generation, you'd have to wait for the last call to finish before making your next one, causing you to need to wait over 15 seconds before you can even generate more images instead of the Expected behavior of being able to send them in parallel and stream in finished generations by awaiting them.
In the example I sent you can see even though I used Promise.all on 2 promises that each take a second that should be expected take only 1 second together but because of the sequential nature the current behavior is it takes 2.
Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app, Parallel & Intercepting Routes, Performance
Which stage(s) are affected? (Select all that apply)
next dev (local), Vercel (Deployed)
Additional context
Edit: https://x.com/cramforce/status/1733240566954230063
Above's link to a reply by Vercel's CTO agreeing it should have control if we want it parallel
The text was updated successfully, but these errors were encountered: