Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FirebasePerformance initialization lazy.#2518

Merged
merged 8 commits into from
Mar 25, 2021
Merged

Conversation

jeremyjiang-dev
Copy link
Contributor

@jeremyjiang-dev jeremyjiang-dev commented Mar 17, 2021

  • Changes:
    • Made FirebasePerformance initialization lazy and moved initialization in the onActivityResumed() callback. Based on our definition of app startup time, initializing FirebasePerformance after onActivityResume() will not be included in the app startup time. Traces generated before FirebasePerformance initialization will be added to the pending pendingEventsQueue and will be dispatched when FirebasePerformance is available.
  • Verification:
    • Verified app start trace, network traces, and trace with annotation
  • Impact
    • Saved 6.6ms(~10%) app startup time

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 17, 2021

Coverage Report

Affected SDKs

No changes between base commit (0b61832) and head commit (3bcdb287).

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (3bcdb287) is created by Prow via merging commits: 0b61832 c0ddadb.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 17, 2021

Binary Size Report

Affected SDKs

  • firebase-perf

    Type Base (0b61832) Head (3bcdb287) Diff
    aar 303 kB 304 kB +982 B (+0.3%)
    apk (aggressive) 968 kB 968 kB +216 B (+0.0%)
    apk (release) 2.43 MB 2.43 MB +520 B (+0.0%)

Test Logs

Notes

Head commit (3bcdb287) is created by Prow via merging commits: 0b61832 c0ddadb.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-perf:
error: Added class com.google.firebase.perf.FirebasePerformanceInitializer [AddedClass]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@jeremyjiang-dev
Copy link
Contributor Author

/test check-changed

@jeremyjiang-dev
Copy link
Contributor Author

/test check-changed

1 similar comment
@jeremyjiang-dev
Copy link
Contributor Author

/test check-changed

@jeremyjiang-dev jeremyjiang-dev merged commit 23fc235 into master Mar 25, 2021
@jeremyjiang-dev jeremyjiang-dev deleted the perfStartupTime branch March 25, 2021 14:00
@firebase firebase locked and limited conversation to collaborators Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants