Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Android] Firestore snapshot listeners is slow to retrieve data.

未关闭
#3,513 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
18/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
android, angular, firebase, typescript

调研方向

首先,使用列出的 Angular、Firebase、AngularFire、Ionic 和 Capacitor 版本,在 Android 上复现第一个 Firestore 快照监听器,并将其与 iOS 和 web 进行比较。检查 compat SDK 是否会影响延迟和捕获时机或调试输出;当 Android 特有的变慢现象得到解释,并且已记录经验证的修复方案或明确的 upstream 转交时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Version info

Angular: 17.3.3

Firebase: 10.10.0

AngularFire: 17.0.1

Other (e.g. Ionic/Cordova, Node, browser, operating system):
Ionic:

Ionic CLI : 7.2.0 (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.8.2
@angular-devkit/build-angular : 17.3.2
@angular-devkit/schematics : 17.3.2
@angular/cli : 17.3.2
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 5.7.4
@capacitor/android : 5.7.4
@capacitor/core : 5.7.4
@capacitor/ios : 5.7.4

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v18.17.0 (/Users/user/.nvm/versions/node/v18.17.0/bin/node)
npm : 10.5.0
OS : macOS Unknown

How to reproduce these conditions

Failing test unit, Stackblitz demonstrating the problem

Steps to set up and reproduce

We have developed an Ionic Hybrid app for iOS, Android, and Web platforms, which has been functioning smoothly for the past two years. However, after multiple library updates, we have encountered an issue specific to Android devices. Retrieving the first fresh snapshot listener takes an exceptionally long time on Android, whereas iOS and web platforms retrieve the same snapshot listener in just 1 second on the same device. Android hybrid apps may take up to 60 seconds for this process.

Interestingly, restarting the app after the initial retrieval significantly improves the speed.

I am currently using the compat SDK instead of the Web modular SDK. I wonder if this choice affects the result.

Sample data and security rules

Debug output

** Errors in the JavaScript console **

** Output from firebase.database().enableLogging(true); **

** Screenshots **

Expected behavior
Actual behavior
主要语言
TypeScript
星标
7.8k
派生
2.2k
平均合并
3 天 6 小时
30 天内合并 PR
5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/angularfire 的其他 Issue

查看 angular/angularfire 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。