angular / angular/angularfire

Performance Issues in Angular Fire 6.1 and higher

Open
#3,306 3 comments 8 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.8k
Forks
2.2k
Avg merge
22h 28m
Merged PRs (30d)
6

Description

### Version info

**Angular:** 13.3

**Firebase:** 9.14

**AngularFire:** 7.2

### How to reproduce these conditions

Create a collection query using the compat mode matching a lot of documents. In our case the query matched 2500 documents. Use the `stateChanges` method on the query and subscribe to it.

Locally trigger an update on one of the documents matched by the query.

### Expected behavior

The listener should update in a performant manner when a state change is detected as was the case in Angular Fire 6.0.5

### Actual behavior

Angular Fire triggers a very long running task. In my scenario tasks lasted more than 4 seconds causing the application to freeze. This behavior can be observed on all versions of Angular Fire > 6.0.5

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the compat-mode collection query with stateChanges and about 2,500 matching documents, then compare its behavior with AngularFire 6.0.5. Done means identifying and resolving the long-running task so a single document update no longer freezes the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, firebase, typescript
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.