Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: batch original stack frame requests in turbopack overlay #75556

Closed
wants to merge 1 commit into from

Conversation

gaojude
Copy link
Contributor

@gaojude gaojude commented Feb 1, 2025

What?

Implements batch processing of stack frames in the development overlay middleware for Turbopack. Instead of processing frames individually, multiple frames can now be processed in parallel through a new POST endpoint.

Why?

This change improves performance when handling multiple stack frames by processing them concurrently rather than requiring separate requests for each frame.

How?

  • Added a new /__nextjs_original-stack-frames POST endpoint
  • Introduced parseFile helper to handle file path parsing
  • Created createStackFrames function to process multiple frames
  • Implemented parallel processing of stack frames using Promise.allSettled
  • Maintained backwards compatibility with existing stack frame handling

Fixes #[issue number]

Copy link
Contributor Author

gaojude commented Feb 1, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gaojude gaojude mentioned this pull request Feb 1, 2025
@gaojude gaojude changed the title works for turbopack batch requests to for original stack frame Feb 1, 2025
@gaojude gaojude changed the title batch requests to for original stack frame feat: batch original stack frame requests in turbopack overlay Feb 1, 2025
@gaojude gaojude marked this pull request as ready for review February 1, 2025 13:52
@gaojude gaojude closed this Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants