admin管理员组文章数量:1410724
I started playing around with my first Next.js project.
After creating a new project via create-next-app
, I ran the performance-tab in the web-app 'Lighthouse' (the results can be viewed in the tabs below). The performance report returned a score of 79, however; all the other test were above 90.
Can someone explain to me why these are the results?
The project is newly created, and totally empty, one would assume a performance report to return a great score for such a project, but it did not. If you have any insight that could help to clarify why the performance test is returning with the results that I explained above, it will be appreciated. Thank you!
I started playing around with my first Next.js project.
After creating a new project via create-next-app
, I ran the performance-tab in the web-app 'Lighthouse' (the results can be viewed in the tabs below). The performance report returned a score of 79, however; all the other test were above 90.
Can someone explain to me why these are the results?
The project is newly created, and totally empty, one would assume a performance report to return a great score for such a project, but it did not. If you have any insight that could help to clarify why the performance test is returning with the results that I explained above, it will be appreciated. Thank you!
Share edited May 6, 2021 at 5:53 AKUMA no ONI 12.1k8 gold badges64 silver badges102 bronze badges asked Mar 27, 2021 at 10:08 Marco MazzaiMarco Mazzai 673 silver badges18 bronze badges 5- 1 All of the suggestions are out there. Please search on google for each topic and you'll get ways to resolve the issue. I've done the same to my projects. – Zunayed Shahriar Commented Mar 27, 2021 at 10:12
- You're right, I changed the title and description. – Marco Mazzai Commented Mar 27, 2021 at 10:29
- This is a fine question @MarcoMazzai. And it deserves an answer from the Google Lighthouse team if you ask me. – serraosays Commented Apr 28, 2021 at 22:19
- 2 Do you have the react developer tools addon installed? For me that's the reason for Remove unused JavaScript. Also, are you using the dev server or the production build? – arkuuu Commented Apr 29, 2021 at 7:56
- Your questions is really relevant. Next should be better, faster, on a fresh project. That means that we must work more on every project to try to "clean" next things. Would be better to have a "performance ready" next. – Tiago Gouvêa Commented May 1, 2021 at 18:17
1 Answer
Reset to default 7 +50I think you are running the test on the development server. In the development mode, there are a lot of unused js codes are being used. That's why the performance is a bit slow. You can check the production build.
All you have to do is:
- run
npm build
npm start
(if your dev server is running on port 3000, then runnpm start -p 5000
)- then go to
http://localhost:5000
and run the lighthouse. I think the performance will be better.
本文标签:
版权声明:本文标题:javascript - Why is the Performance score of an empty, default NextJS Application so low? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745061616a2640265.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论