Improve performance of normalizeUUID function. #3772
Labels
Platform: Android
Platform: Java
Sync: Jira
apply to auto-create a Jira shadow ticket
Waiting for: Product Owner
Problem Statement
normalizeUUID
is called on main thread and cause 2-10 ms operation on production application.There are low handing fruits.
DefaultTransactionPerformanceCollector.start
callstransaction.getEventId().toString()
twice and it basically make same operation. It uses normalizeUUID under the hood which take time.Solution Brainstorm
Please assign
transaction.getEventId().toString()
to a val and dont do computation again.convert
performanceDataMap
to map of EventId instead of string and dont do EventId to String conversion while creating a trace.I didnt check all usages of toString, it will be nice to check them and consider not unboxing the toString on main thread
or cache the value of toString and hashCode with lazy.
┆Issue is synchronized with this Jira Improvement by Unito
The text was updated successfully, but these errors were encountered: