New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 702779 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Class.getSimpleName takes 49% of total Cronet initialization time

Project Member Reported by kapishnikov@chromium.org, Mar 17 2017

Issue description

The attached Android profile contains CPU profiling of Cronet initialization code. According to the profile, most of the time (49%) was spent in the Class.getSimpleName() method. We should investigate it and see whether removing this call can significantly improve the performance. Cronet uses Class.getSimpleName() for logging to assign the logging TAG.

 
cronet_nexus7.trace
650 KB Download
Replacing getSimpleName() with a constant indeed decreased the initialization time (at least according to the tracing). The time changed from 288ms to 166ms (-42%). We should check whether the reduction is true if the tracing is turned off. The corresponding trace file is attached.
cronet_nexus7_no_simple_name.trace
377 KB Download
Owner: kapishnikov@chromium.org
Status: WontFix (was: Untriaged)
I created a script that runs a test app 100 times with tracing turned off and measures the timing. The results are:
- 41ms if the app calls getSimpleName()
- 40ms if the app doesn't call getSimpleName().

It looks that the tracing significantly skews the results. Closing the issue.

Sign in to add a comment