Skip to content

Save token on a separate thread. #3693

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

Merged
merged 1 commit into from
May 4, 2022

Conversation

gsakakihara
Copy link
Contributor

  • Changed blockingGetToken() to save the token on an Executor thread to avoid doing file IO on the main thread.

* Changed blockingGetToken() to save the token on an Executor thread to avoid doing file IO on the main thread.
@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-messaging

    Overall coverage changed from 84.82% (672c6dc) to 84.91% (58b0a05) by +0.09%.

    FilenameBase (672c6dc)Merge (58b0a05)Diff
    FcmExecutors.java60.00%80.00%+20.00%
    FirebaseMessaging.java75.11%75.33%+0.22%

Test Logs

Notes

  • Commit (58b0a05) is created by Prow via merging PR base commit (672c6dc) and head commit (a6298c4).
  • Run gradle <product>:checkCoverage to produce HTML coverage reports locally. After gradle commands finished, report files can be found under <product-build-dir>/reports/jacoco/.

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/gturnbkown.html

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-messaging

    TypeBase (672c6dc)Merge (58b0a05)Diff
    aar142 kB142 kB-13 B (-0.0%)
    apk (aggressive)437 kB437 kB+44 B (+0.0%)
    apk (release)1.14 MB1.14 MB+24 B (+0.0%)

Test Logs

Notes

  • Commit (58b0a05) is created by Prow via merging PR base commit (672c6dc) and head commit (a6298c4).

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/HUt1vU9tlG.html

@gsakakihara gsakakihara requested review from VinayGuthal, willxu-google and James201311 and removed request for VinayGuthal May 2, 2022 22:04
Copy link
Member

@James201311 James201311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -195,7 +197,8 @@ static synchronized FirebaseMessaging getInstance(@NonNull FirebaseApp firebaseA
new GmsRpc(
firebaseApp, metadata, userAgentPublisher, heartBeatInfo, firebaseInstallationsApi),
/* taskExecutor= */ newTaskExecutor(),
/* fileIoExecutor= */ newInitExecutor());
/* initExecutor= */ newInitExecutor(),
/* fileExecutor= */ newFileIOExecutor());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: how about renaming it to newFileExecutor?

@gsakakihara gsakakihara merged commit 96e4dcd into master May 4, 2022
@gsakakihara gsakakihara deleted the gsakakihara/save_token_executor branch May 4, 2022 16:03
@firebase firebase locked and limited conversation to collaborators Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants