6

I am developing next js application and in development enviroment it takes lot of time to load, The page goes unresponsive in the start and then if I cancel the request it stop loading, after refreshing it loads immediately. I am using material ui and few other smaller packages, my apis are not slow and neither i am using big libraries or packages.

1

I am trying to create next js application but response time is very slow

Jonas
  • 121,568
  • 97
  • 310
  • 388
yahya Ammar
  • 61
  • 1
  • 3
  • Please provide more info. Are you fetching something server side (it will slow down the initial load). Are you using it in docker? Write logs to check how many times the components render. The last check is to comment on parts of code and try refreshing it and find out if some part of the code slower it. – Buggies Feb 25 '23 at 19:19
  • The first load in DEV mode can be quite slow, because a lot of DEV overhead is loaded. If the re-loads and hot-reloads are fast enough, and a production build is fast enough (`next build`, `next start`), I wouldn't be concerned. But I agree, that is weird, e.g. I start the server with `next dev`, it takes forever, but if I press F5, even before the first page load is finished, the page loads quick. Also MUI can become quite large. – kca Feb 26 '23 at 22:20

0 Answers0