'Firebase Storage very slow to respond
The time to download an image from firebase storage: 2.59s
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
}
}
}
Solution 1:[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.
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | crunchytoast |
Solution 2 | Froilan C |