简体   繁体   中英

How to improve a performance of the query to Firebase firestore

I'm facing a problem related performance using Firebase firestore.
The reason is recognized, but the solution is not found.
How do I cope that?

        const snapshot = await db
      .collection("customers")
      .doc(id)
      .get();

The size of a request is not a large, about below 10KB.

This image is a result at inspector. 在此处输入图像描述

There's nothing you can change about the code you shared to improve the performance. Your only options would be to get a faster internet connection (lower latency and/or more bandwidth).

From the screenshot it seems to take 53ms to read the document, which seems pretty reasonably to me at first glance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM