[Performance] Increased TTFB on assets

Hello,

on one of my sites (https://rødt.no) I’m experiencing increased latency (TTFB) on assets, up to almost 4 seconds on some. That doesn’t seem right!

I’m not seeing this issue on other pages, so that adds to my confusion. Any clues as to what might be wrong?

2 Likes

Hi @jorngeorg, can you provide the URL for that specific asset that you took the screen shot from? Also in the response to that request there is an x-nf-request-id that allows us to lookup a request in our logs, that would also be useful to debug this issue. Thanks.

Hi thanks for getting back to me. Here’s the information you requested:

Url: https://rødt.no/images/logo_pos_anim.svg
x-nf-request-id: 8e454da7-12cf-4718-b020-1632d2d3383d-255093

So, I see that asset load at 2019-06-29 10:30:55 UTC and it seemed to take us 2 milliseconds to serve it, based on our server logs. Do you get that result reliably on that file? Does it happen to every asset or just that one?

I wasn’t able to get a long load myself, but I only tried from a few locations (EU/AU/US).

Hi, thanks for looking into this.

I’m getting fairly long TTFB on most of the local assets (images, css, js), but not on external resources. Some examples below:

Strangely I’m not getting long loads if I try to request the asset directly (copy/paste url):

That might be a hint that there’s something amiss in my front-end code, perhaps?

Sorry for the slow response, Jørn! Would you mind capturing a HAR file (see HAR Analyzer for details about how to get one from Chrome) of those slow loads so we can dig in a bit more? The screenshot suggests that it is not what you mention (which was also what I was hoping the answer was!), but it’s hard to be sure without seeing a HAR file of you experiencing it.

Here’s the HAR-file: https://www.dropbox.com/s/goko9ujv3b7yqut/xn--rdt-0na.no.har?dl=1

(Hope I did that right)

Hi @jorngeorg,

I noticed quite a bit of queuing and stalled requests, however that may be separate from the issue you described which is a request that took you over 3 seconds, but from our side it completed much faster. Have you tested this on other networks to see if you have the same experience with long requests (not including stalled/queued requests)? Have you tried on Firefox? Note that I expect you to continue seeing the queuing/stalled requests, but taking multiple seconds to transfer a small file while on a fast connection is unusual.

I have also been seeing increased load times for assets, and it seems like TTFB is what’s doing it in my case, as well. As my site is completely static, I tried hosting it through good-old FTP and everything worked smoothly. When going back to Netlify, loading got slow again.

Requesting assets directly is quick/normal with me too.

@semonje, your site loads for me fully in under 1 second:


Do you have any examples that you can share that we can look at? a HAR file would be helpful, so would screen shots and/or x-nf-request-id .

Well, it seems like it’s fine now… For whatever reason, because I haven’t done anything :thinking:

It would be so slow that even tiny SVGs would use several seconds (mostly on TTFB). Now it’s all smooth though. I’ll let you know if the issue appears again, in which case I’ll include a HAR file and screenshots!

1 Like

Sounds like a good idea, @semonje ! We’ll be happy to follow up if it occurs again.