Yiannis
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
I know the feeling. You feel great you solved the thing troubling you for ages but so mad cause it was silly 😂 we have all been there. If you will be self hosting looking into making a docker image and using docker if you don’t need coolify!
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Hey, I don’t think you need to reach for axiom on this particular issue. If you are still facing it try to check all the components on the tree to find the one causing trouble. Most dumb and straightforward way is to make a test page and start from the top of three mounting the components until you see the slow down
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Check your component tree of that page, there has to be either some fetch or some really large media files or something along these lines
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
And the slow one in dev takes 21s?
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
And it’s a new page right?
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
That’s normal
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
In dev or start ?
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
I will be going in a minute, just check to see if it’s the same performance in a new page with a completely blank server component or if it’s just that one
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Server components are not that slow normally
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
That’s not the issue
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Can you try and make a new blank page and render an empty sever component there and check the network tab?
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
When you do the npm start, is that on your local machine or on the vm? I mean like when you are experiencing the 5s with the empty component
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Yeah sorry ignore that
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Actually never mind that was silly to ask
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Do you have a trpc router called appointments?
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
When you comment out the component, can you check the network tab in your dev tools to ensure there is no fetch requests of any kind
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Are you using next auth for authentication? If so that has a context and if there is a strange issue with your data source then that could be causing it
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
Have you made any additional contexts you are wrapping your app?
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
If it’s a bunch of prisma queries two seconds is not the craziest in the world but considering you are running on a vm and the db is locally available it still is too much.
108 replies
TTCTheo's Typesafe Cult
•Created by Mase on 10/23/2024 in #questions
Next JS slow initial compile time
No, that’s not normal at all especially if your data source is running on the same network as the application.
How many queries are we talking? Keep in mind that an async function won’t return until all the awaited promises return, so it just be one that is causing the issue.
No worries about sharing the code.
108 replies