Closed oliverkidd closed 1 year ago
Yeah I had to ditch next because of this. I am having 4-5 second page load times in dev on simple pages with no api calls
I’m referring to production builds as dev is always going to compile on request. But I assume you saw it there too?
@Jared-Dahlke - out of interest, what did you ditch to?
@Jared-Dahlke - out of interest, what did you ditch to?
I converted my companies app from vite to nextjs 13 pages, then to app dir, but wasn't happy with the performance so went back to vite .
A handful of problems I encountered with app dir:
Overall I liked it and I've already upgraded one of my old side projects to app dir . But for something big and complex I just couldn't make it work . I will probably try again soon though
@Jared-Dahlke - out of interest, what did you ditch to?
I converted my companies app from vite to nextjs 13 pages, then to app dir, but wasn't happy with the performance so went back to vite .
A handful of problems I encountered with app dir:
- Slow page loads in dev (mentioned here )
- No importing stuff from dot. For Eg you can't import colors from "mycolors" and then use colors.black. I had all my api calls in an object like that so I would have had to rewrite all that
- We use auth0 and the official next auth0 has some problems with app dir they talk about them on the read me.
- Couldn't access request in server components which made it much less useful than getServerSideProps
Overall I liked it and I've already upgraded one of my old side projects to app dir . But for something big and complex I just couldn't make it work . I will probably try again soon though
And icing on the cake was it used mantine 5, and mantine doesn't support app dir until v7 alpha.
Thanks for the detail @Jared-Dahlke.
I am also getting a bit fed up with Next 13 app dir on a larger project. Will likely move back to 12 or something else until it becomes more stable 😅
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Data fetching (gS(S)P, getInitialProps), Dynamic imports (next/dynamic), Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue or a replay of the bug
na
To Reproduce
Setup
Our project has ~1300 pages with nested dynamic routes. Eg:
We are using mantine library for components, stripe for payments, google recaptcha (async deferred)
ALL data fetching is conducting on page.tsx level, and none of the dynamic route page.tsx files are "use client", but the vast majority of components they contain are.
Describe the Bug
Deploying an app router nextJs project and seeing >1s ttfb on page reload for all routes, including test routes just containing an empty div. The TTFB is almost entirely dedicated to 'waiting' for backend processing.
Have tried to deploy to netlify/AWS to rule out vercel as the cause and netlify the issue is similar but AWS doesnt seem to deploy nextJs13 (with out version) from our efforts.
Expected Behavior
From what I expec, a SSR site should be snappy and not have 1s load times. What possibly takes that time up? I can only think of compiling?
Attempts so far:
Current position
Stuck. The only remaining idea would be to make better use of suspense? However, having tried that - no luck.
I have also noticed that a simple page.tsx for the home route with nothing but an empty div within does not statically render. What would cause that behaviour? None of the parent layout/providers components depend on any dynamic functions that would opt them and their children out of dynamic rendering.
Would appreciate any individuals currently running a nextJs app dir project with dynamic routes to get in touch with their metrics on ttfb and how/if they encountered issues like this!
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel