firebase / firebase/firebase-ios-sdk

High CPU usage on a real device - background -> foreground

Open
#3,242 44 comments 1 reaction 1 assignee Claimed by @morganchen12 View on GitHub
api: analytics
Dominant language
C++
Stars
6.7k
Forks
1.8k
Avg merge
2d 14h
Merged PRs (30d)
72

Description

Environment
* Xcode version: 10.2.1
* Firebase SDK version: 6.3.0
* Firebase Component: Core, Messaging
* Component version: Core - 6.0.3, Messaging - 4.1.0

Describe the problem
On a real device, after the an app was launched, moving the application from foreground to background and then back to foreground, the CPU usage increases to 100% for ~24 seconds.
I have tried using Instruments to identify the source of the problem, and from what I can see, on a background thread the CPU usage increases to 100%.

Steps to reproduce:
This happens only on a real device, and not on the simulator.

In the didFinishLaunchingWithOptions, the method FirebaseApp.configure() is called - and that's pretty much all needed.

Then simply run the app on the device, move the app to background and then to foreground, and notice the CPU usage increase.
Note: this may not happen on the first try, it should happen on the second attempt or third one.

Screenshot 2019-06-24 at 14 59 42

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.