After a long break I tried Profiler in Android Studio looking for a way to optimize performance of #AndStatus. And now it not only works, but allows me, at least on #Android emulator, to see most lengthy operations. As a result, a timeline loads at least three times faster. To be released in AndStatus v.39.
Profiler allows you to record your application's activity and present it as "Call chart", where you can see durations of execution for each method in the stack and easily figure out most lengthy.
Clicking on the method's bar in this call chart brings you to its source code...
I found out that Regex-related methods are the most time-consuming, and optimized them both via using compiled Pattern instead of regex strings, and by executing lengthy operations once only (i.e. I store result of such checks and reuse it later instead of repeating costly operations).
Doc on the #AndroidProfiler : https://developer.android.com/studio/profile/ https://loadaverage.org/attachment/4309407