[CLOUD_FIRESTORE] Long fetching time of data in local cache
メンテナーはふだん 1 日以内に返信
@dconeybe がすでに取り組んでいます。
2026年3月16日 から。
評価
この issue はまだ評価されていません。
説明
[REQUIRED] Step 2: Describe your environment
Packages in Flutter project:
- firebase_core: 4.4.0
- cloud_firestore: 6.1.2 (corresponding to Firebase BoM 34.7.0)
[REQUIRED] Step 3: Describe the problem
We've noticed an issue with persistent storage in our Flutter project. Very similar to https://github.com/firebase/firebase-android-sdk/issues/7198#issuecomment-4045347626. It happens only on Android, I’m not able to reproduce it on iOS.
When we have a lot of cached data e.g. 5k records, then some specific queries need much more time to be executed e.g. 100ms vs 2s.
Here is an example of a query:
final DateTime nowDateTime = DateTime.now();
query = query
.where('Dateandtime', isGreaterThanOrEqualTo: Timestamp.fromDate(nowDateTime))
.where('Dateandtime',
isLessThanOrEqualTo: Timestamp.fromDate(nowDateTime.add(const Duration(days: 7))));
Disabling persistence storage fixes the issue.
I also tried enabling automatic index creation and manually providing indexes, but I didn’t notice any significant difference.
Steps to reproduce:
- Fetch a list of items using Stream. It should return data very quickly.
- Persistence storage is enabled. Fetch ~5k random items.
- Execute the same query as in step 1. The execution time increases a lot.
Here is also a SQLite database with the state at which executing the above query takes ~2s instead of 200ms.
https://drive.google.com/file/d/1rP3hB6qSMjRqUshvmS7rMrNIhDJSXyqh/view?usp=sharing
cc: @dconeybe
If you won't be able to reproduce the issue let me know. I will try to help.
- 主要言語
- Java
- スター
- 2.6k
- フォーク
- 733
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 72
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-android-sdk のほかの issue
-
api: remoteconfig
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
firebase/firebase-android-sdk#8827 ·
メンテナーはふだん 1 日以内に返信
-
Crashlytics plugin writes build ID lists in directory listing order, so APKs can differ between machines対応中かも @mrober が 8 日前に担当しました。 オープンapi: crashlytics
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
firebase/firebase-android-sdk#8789 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
api: auth
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
firebase/firebase-android-sdk#8505 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
firebase/firebase-android-sdk#8835 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
firebase/firebase-android-sdk#8832 ·
メンテナーはふだん 1 日以内に返信
firebase/firebase-android-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NationalSecurityAgency/ghidra#10220 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
RIS export splits an organization name containing “and” into multiple authors対応中かも @Gautam-aman が今日担当しました。 オープンstatus: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JabRef/jabref#17821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
FailureContext.java rounds down thresholds in lastedAtLeast()対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信