任何人都知道为什么与 Firebase 托管相比,Firebase 存储会慢得离谱吗?
结果
16ms
2.23s (2.22s is TTFB)
1.72s (1.70s is TTFB)
这在测试中一遍又一遍地重复。有什么方法可以将其加速到合适的时间,或者对于小文件(图像/拇指)来说,firebase 存储是否不可用?
比较
500ms
30ms
20ms
额外信息:
最佳答案
除了@Ziwi 回答。
我认为直接在 Firebase 中更改规则也可以
// Only a user can upload their profile picture, but anyone can view it
service firebase.storage {
match /b/<bucket>/o {
match /users/{userId}/profilePicture.png {
allow read;
allow write: if request.auth.uid == userId;
}
}
}
来源是https://firebase.googleblog.com/2016/07/5-tips-for-firebase-storage.html关于与 Firebase 托管相比,Firebase 存储非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43851742/