Does/Will turbopack dev server support http2? #9156
-
SummaryI've been searching both in Github issues and google, and I can't find much information as it relates to HTTP2. Where Turbopack's dev server will return individual unbundled modules, the issue becomes that in http1, depending on the browser, a limited number of simultaneous requests are supported (good summary here: https://stackoverflow.com/a/985704). This means that despite a Turboback NextJS application providing all the individual modules simultaneously - our development experience will still have a waterfall as it waits for the earlier modules to be downloaded. Additional informationContext: I've been investigating some development performance issues, where essentially we have a NextJS application that is serving up a webpack dev server bundle that is 14MB. I'm investigating whether NextJS 14 + Turbopack might be a quick solution. I have here a repo where I reproduce this scenario by having a lot of files, most unused, and reference them via barrel files. https://github.com/dwjohnston/bundle-size-investigation/tree/main/scenario-next If we start the dev server without turbopack, here is the waterfall we get: To note: We have that one Here we start the dev server with turbopack: Now we have several files, notably the barrel files which are 389kB each (in this scenario each barrel file exports 50 functions, each function logging a 10240 character length string) Although the requests all start simultaneously - you can see the later requests in the requests have most of their time taken up 'queueing' (the white bar) as they have encountered Chrome's max simultaneous requests per domain limit. Examplehttps://github.com/dwjohnston/bundle-size-investigation/tree/main/scenario-next |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, thanks for the discussion. Turbopack is now in vercel/next.js, I'd recommend opening this issue there. |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the discussion. Turbopack is now in vercel/next.js, I'd recommend opening this issue there.