I´m looking at the systrace
generated by my app and I have identified a frame that is taking too long.
This is caused by a RecyclerView
's onCreateViewHolder
when inflating my item view. The item view is as flat as posible with ConstraintLayout
. But the below systrace
report has a lot of VerifyClass
blocks that take 17 ms each.
What does that VerifyClass
blocks mean?
Systrace is a legacy platform-provided command-line tool that records device activity over a short period of time in a compressed text file. The tool produces a report that combines data from the Android kernel, such as the CPU scheduler, disk activity, and app threads.
Not really an C++/Android Runtime internals expert to clearly explain what the VerifyClass
method defined in /art/runtime/class_linker.h and implemented in /art/runtime/class_linker.cc means, but I wouldn't pay that much attention to its CPU execution time.
What I'd take into consideration is your RecyclerView
items that contain ConstraintLayout
and whose inflation consumes the CPU time.
Regarding the suggestion to try a release build, it won't make any difference - calls to the native VerifyClass
method will be done for both debug and release builds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With