1

The time to download an image from firebase storage: 2.59s

enter image description here

Is there any way to speed this up to a decent time, or is firebase storage unusable for small files (images/thumbs)?

My project:

https://beach-real-estate.vercel.app/

update---

my firestone rules:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    // Listings
    match /listings/{listing} {
        allow read;
      allow create: if request.auth != null && request.resource.data.imgUrls.size() < 7;
        allow delete: if resource.data.user == request.auth.uid;
      allow update: if resource.data.user == request.auth.uid;
    }
   
    // Users
    match /users/{user} {
        allow read;
        allow create;
        allow update: if request.auth.uid == user
    }
  }
}
Ricardo de Paula
  • 572
  • 5
  • 16

2 Answers2

1

Where did you choose for the firebase server location? It might just be lag? I've never experienced load times like that using firebase, unless it was for large files.

crunchytoast
  • 488
  • 4
  • 5
  • It is my first project with firebase/google cloud. I don't know where this configuration is, I searched on google but I couldn't find it. Is this configuration in the google cloud console? – Ricardo de Paula May 11 '22 at 13:51
  • Do I have to install gcloud CLI? – Ricardo de Paula May 11 '22 at 14:26
  • Login in to the firebase console and look at project settings, you should see Default GCP resource location. This can affect response times but I don't know to what degree... – crunchytoast May 12 '22 at 09:53
1

Firebase storage is basically a bucket within GCP. If you want to have faster download times, you should make your files publicly available.

If you need a guide for that, use this

There's a similar question here that may help you.

Froilan C
  • 21
  • 3