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

Increased fetchAndActivate() time with Firebase Analytics 22.3.0 #6746

Open
whitipet opened this issue Mar 7, 2025 · 4 comments
Open

Increased fetchAndActivate() time with Firebase Analytics 22.3.0 #6746

whitipet opened this issue Mar 7, 2025 · 4 comments

Comments

@whitipet
Copy link

whitipet commented Mar 7, 2025

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 2024.3.1.13
  • Firebase Component: Analytics 22.3.0, Config 22.1.0 (Database, Firestore, Storage, Functions, etc)
  • Component version: r8 8.9.28

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

After updating Firebase Analytics to version 22.3.0, the time to get the result from FirebaseRemoteConfig.getInstance().fetchAndActivate() has multiplied a lot.
If the version of Firebase Analytics is 22.2.0, the response comes within 1 second (provided that the network connection is good). If the version of Firebase Analytics is 22.3.0, the response time can reach 20 seconds (if the network connection is also good).
It is not clear what impact Analytics has on Config, but lowering the version of Firebase Analytics helps to solve the problem.
Notably, this problem occurs only when obfuscation is enabled.

Relevant Code:

FirebaseRemoteConfig.getInstance().fetchAndActivate().addOnCompleteListener {
	Log.d("FirebaseRemoteConfig", "fetchAndActivate: ${it.result}")
}
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@lehcar09
Copy link
Contributor

Hi @whitipet, thank you for reaching out. I tried comparing the reproducing the issue, however, I didn't see much difference in response time with/without R8 enabled.

Are you constantly experiencing this behavior? By any chance, can you share an MCVE to help us investigate this?

@whitipet
Copy link
Author

Hi @lehcar09, thank you for noticing the issue.
I created a test project, but like you, the fetchAndActivate time has not changed at all. It seems that there is something else that affects the time on the main project I am working on.
For now, downgrading Firebase Analytics helps to speed up the fetchAndActivate time. When I have more context, I'll let you know.

@drusak-raptech
Copy link

Just faced with the same issue updating from BOM 33.8.0 to 33.10.0
Fetching remote config became much slower.
The median time to retrieve Remote Config has increased nearly threefold, according to our internal analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants