Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Firestore] Very slow GET requests

Đang mở
#2,932 6 bình luận 0 reaction 1 người được giao Xem trên GitHub

@ehsannas đang làm issue này rồi.

Từ ngày 15/7/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

api: firestore
[REQUIRED] Step 2: Describe your environment
  • Operating System version: Linux
  • Firebase SDK version: 13.4.0
  • Firebase Product: Firestore
  • Node.js version: 22
  • NPM version: 10.9.2
[REQUIRED] Step 3: Describe the problem

We have simple Firestore queries, filtering on simple properties.
When fetching from backend (nodejs), it takes a very very long time.
Same query using frontend libraries takes 1% of the time.

Explain query shows that the backend query is fast, but the result takes forever to download.

If we use Firebase frontend client libraries, the same query result is loaded 50x faster.

As an example, a query with result set of 100 documents took 4 seconds to fetch with firebase-admin
1000 documents took 21 seconds to fetch with firebase-admin

This is not a network issue, as we can run the same queries on backend and frontend from same hardware, and get 50x faster results in the client libary, compared to firebase-admin.

Any idea what it could be?

It is NOT the query that is the issue, using tools we can see that correct index is used.
We can also see that result set is streamed right away.

But the actual fetching of result data takes forever with this library.

Thanks in advance

Here is a snippet from a query with result set of 1000. We can see that result is immediately starting to download.

Firestore (7.11.0) 2025-06-09T14:36:33.255Z CNebO [ClientPool.acquire]: Creating a new client (requiresGrpc: false)
Firestore (7.11.0) 2025-06-09T14:36:33.310Z ##### [clientFactory]: Initialized Firestore GAPIC Client (useFallback: rest)
Firestore (7.11.0) 2025-06-09T14:36:33.311Z CNebO [Firestore.requestStream]: Sending request: {"parent":"projects/fastorder-prod/databases/(default)/documents/company/gorilla","structuredQuery":{"from":[{"collectionId":"orders"}],"where":{"fieldFilter":{"field":{"fieldPath":"orderStatus"},"op":"NOT_EQUAL","value":{"stringValue":"ARCHIVED"}}},"limit":{"value":2}}}
Firestore (7.11.0) 2025-06-09T14:36:34.856Z CNebO [Firestore.requestStream]: Received response: {"document":{"fiel.... rest of result set

Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
4 ngày 20 giờ
Pull request đã merge (30 ngày)
16

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/firebase-admin-node

Tất cả issue của firebase/firebase-admin-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.