#lighthouse moment
1 messages · Page 1 of 1 (latest)
Looking at your website in https://web.dev/measure/?url=https%3A%2F%2Fwww.omnidoc.ma%2F (lighthouse run on Google's servers)
it seems your site in general is just built slow. There's too much JavaScript being run and there just isn't much you can do to optimize that further
There is still room for improvement, though and you can use the website above to know more about what you can try (it also spotted a React error so maybe take a look at that as well)
It doesn't look like your server is the culprit either since I don't see any warnings about server response time
Test your pages in a lab environment powered by PageSpeed Insights. Then get tips and recommendations to improve your user experience. For field performance, see the PageSpeed Insights tool.
Apologies for bad formatting I'm on phone
Am happy with your response thanks a lot, i just dont know how to fix that much js files , and also am using nginx which is a good webserver
might I suggest going through your entire app, finding bulky components that don't need to load immediately and dynamically importing them instead? https://nextjs.org/docs/advanced-features/dynamic-import
you can use suspense to make a placeholder for your components while they get downloaded dynamically
if you need a loading placeholder you can try these which I found in #showcase https://os-c.vercel.app/loader
(they require an animation library thats a little on the heavy side though so, pick your poison)
Ok @chrome meteor thanks a lot for your help, can u tell me please does the cpu of webserver matter for my nextjs website , does adding more cpu can speed my site ?
I'm sorry I can't really answer that question
nginx is a really solid webserver and overloading it just with serving static files seems quite the challenge
@delicate steppe are you hosting directly from nginx or are you passing through to the nextjs server?
its oky 😉
Yes am hosting my website in dogitalocean using a droplet "ubuntu 20 and using nginx as my webserver"
okay
have you considered using vercel or a static-only alternative such as cloudflare pages?
https://developers.cloudflare.com/pages/platform/limits/ cloudflare pages in particular has no data upload limit, and since it's distributed, you won't have to worry about CPU
though you should only really use it if you don't think vercel is going to cut it for your needs
The problem is the website is for a pro-company and its dynamic, am using sanity as my cms inside of it etc , thats why i didnt use cloudflare pages or vercel, but i will try my best to find a better solution, using ur advices and links and some searches, thanks a lot i realy appreciate