Skip to content
Discussion options

You must be logged in to vote

The NextNodeServer.createComponentTree span measures how the server prepares the React component tree before rendering.
It includes module resolution, layout loading, and preparing the server component boundaries, but not the data fetching itself — those happen after the tree is created.

If it takes ~1s, it’s often due to:
Heavy layout or middleware imports

Multiple dynamic imports or slow cold starts (especially on AWS Lambda)

Lack of persistent caching (cacheComponents: true helps)

To optimize:

Use use cache for static routes

Reduce imports in layout.tsx

Ensure your Lambda has warm concurrency or a smaller bundle size

You can confirm this by checking the spans right after the tree creat…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DevWisdom8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants