Skip to content

[iOS] FireStore keep on using CPU #10168

@shohe

Description

@shohe

Description

I'm using FireStore at my current iOS project and I realized that when generate CollectionReference or DocumentReference, FireStore starts keep on using CPU (around 10%) until app close.

I'm using

  • Firebase 9.5.0
  • install with SwiftPackageManager
  • Xcode version 13.4.1 (13F100)

Here is sample code (same as document).

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
    FirebaseApp.configure()
    let db = Firestore.firestore()
    db.collection("Collection").document("test").setData(["lastLoginAt":Date()], merge: true)

    // Even this code happens issue ↓
    // let ref = db.collection("Collection")

    return true
}

Screen Shot 2022-09-03 at 14 28 41

Reproducing the issue

No response

Firebase SDK Version

9.5.0

Xcode Version

13.4.1

Installation Method

Swift Package Manager

Firebase Product(s)

Firestore

Targeted Platforms

iOS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions