Open
Description
[READ] Step 1: Are you in the right place?
yep
[REQUIRED] Step 2: Describe your environment
- Android Studio version: AS 4.1 RC1
- Firebase Component: Performance
- Component version: 19.0.8
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
- Build app with
firebase_performance_logcat_enabled
=false
- Create + start Firebase Trace in the app
- Use
Trace.incrementMetric()
1k+ times - Observe lots of allocations made by logging inside
Trace.incrementMetric
even when logging is disabled
Relevant Code:
Current implementation of successive path in Trace.incrementMetric
:
this.zzai.zzm(String.format(Locale.ENGLISH, "Incrementing metric '%s' to %d on trace '%s'", var1, var5.getCount(), this.name));
Every time when metric is increased, there are allocations in String.format
, Long.valueOf
for each call, even if logging is disabled (=production/release build)
Since Firebase Performance
is for performance measuring, no need to add extra excessive overhead