Improve rendering performance (#64408)
This PR improves the server rendering performance a bit, especially for the App Router. It has mainly 2 changes. A rough benchmark test with a 300kB Lorem Ipsum page, SSR is about 18% faster. ### Improve `getServerInsertedHTML` - Avoid an extra `renderToReadableStream` if we already know the content will be empty - Avoid `await stream.allReady` for better parallelism with `streamToString()` - Increase the `progressiveChunkSize` ### Improve `createHeadInsertionTransformStream` - Only do chunk splitting and enqueuing if the inserted string is not empty
Showing
Please
register
or
sign in
to comment