Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does VerifyClass inside Systrace mean?

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?

enter image description here

like image 976
Oscar Méndez Avatar asked Oct 12 '17 05:10

Oscar Méndez


People also ask

What is Systrace in operating system?

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.


Video Answer


1 Answers

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.

like image 66
Onik Avatar answered Sep 23 '22 13:09

Onik