Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase hosting static file serve very slow

My user took 1.6 min to download a 900KB static file from firebase hosting.

May I know is there any way to optimize this?

enter image description here

like image 219
kingwei Avatar asked Nov 22 '19 03:11

kingwei


2 Answers

There really is no way to optimize the time it takes for Firebase Hosting to serve static content, other than taking steps to reduce the amount of data to transfer (maybe compressing it differently), or splitting the data among more than one concurrent request.

It will take as long as it takes to transfer the content the user. The user's internet connection speed makes a huge difference, and if their connection is slow, that situation can't be improved.

like image 99
Doug Stevenson Avatar answered Dec 05 '22 09:12

Doug Stevenson


Thanks for Doug Stevenson on pointing out, the main reason for slow TTFB and content download speed is because Fastly CDN performs poorly in my country (Malaysia). Switched to Cloudflare to resolve the problem.

The image below shows that test on Cloud Harmony, Fastly CDN has a really bad result especially downlink for > 256KB enter image description here

like image 37
kingwei Avatar answered Dec 05 '22 09:12

kingwei