My gatsby site is slow, but when i try it in gatsby cloud it is fast

my costume domain is muhzulzidan.com and my netlify domain is
cockpit-blog.netlify.app.

my har file

Have you considered making your primary domain www.muhzulzidan.com instead of muhzulzidan.com so the Netlify CDN can help serve your website’s files more quickly?

thanks for the response, but it is slower after i do that.

it goes from 52 to 46

On which service – TestMySite, GTMetrix, Pingdom, Sucuri, PageSpeed, etc?

Testing from where I am in Southern California:

Pingdom gives your site an 80 from Washington, DC.

PageSpeed gives 55.

Sucuri shows good first-connection times, but with an overall score of F, with many countries not being able to connect.

GTMetrix gives a PageSpeed score of 96% with a Yslow score of 84%.

I mainly use page speed… I wonder about this… why is that?

I also wonder why the metric is not consistent…

especially in page speed that is not very consistent.

I don’t know how Google conducts tests, but the location of the testing center and other factors will result in different scores.

It might also have to do with how you’ve constructed this page / site.

For example, the bulk of this page is a huge amount of CSS that is embedded in the page instead of being in a separate CSS file that can be cached and called.

You are also pre-loading things that are never used on the page.

You seem also to to be calling in the page content via JavaScript, instead of having it be static.

You also say you are not taking advantage of the Netlify CDN.

You have also embedded at least one image instead of calling it.

You also have JavaScript in your element that can go at the bottom of the page.

You also have invalid HTML code, such as

elements inside of h1, etc.

Not judging, just saying.

1 Like

no worries, maybe it is my fault, but when i tried it on localhost i get 80 using google audits…

so that is the reason i am asking it…

thanks for having the time to look for my problems

I was pointing this items out as possible contributing factors. On localhost, you don’t have network latency, etc., so everything is much, much faster.

1 Like

Thanks so much to @gregraven for talking through this with @muhzulzidan ! Greg gives a lot of the same advice our staff would:

  1. make sure you understand what is being tested
  2. allow for things to be different locally than on the network

For our staff to debug further, we’d need to see specific slow requests. If you’d like to capture an x-nf-request-id HTTP response header value (see this article for how to do it), then we can look at our internal logs and correlate the response.

Even better would probably be a HAR file (see HAR Analyzer for details about collecting it), since that will show all the interactions of your page. One from gatsby cloud and an identical URL from Netlify would be the best side-by-side comparison setting and I won’t be shy about admitting it, in case their service looks better than ours :slight_smile:

never mind bro, i guess google site speed analyser is taking its time because last time i check i already get 98 in performance… and i admit how newbie i am in coding

1 Like