Open kunall17 opened 5 years ago
Hi @kunall17,
Can you please elaborate a bit on how you calculated the 20 millis benchmark? Is this from the profiling info directly from the bindView method or a separate dry run test?
On a cold started JVM and an idle CPU (say inside a handler.postDelayed of a few seconds with no code running in between) we observed 15-30 millis - But inside an adapter when the app is already running it’s much faster. In out tests we used your code inside an adapter - we benched 6-7 millis for the first ‘generate()’ and under 1 for subsequent calls.
Thanks
Hey, sorry for the late reply.
I used Debug.startMethodTracing("...");
at the beginning of the onBindViewHolder and Debug.stopMethodTracking()
at the end of the onBind.
Yes this is the results of first binds in the fragment, will bench and let you know the specifics of the later items.
This is the tracing of a bindViewHolder in a recyclerView for displaying videos using ExoPlayer. Where the methods to generate the URL's are taking a lot of time, which was unexpected.
A snippet of the code is here, this method is taking 20.41 ms which seems to be a lot for generating an URL.
Is there something which we are doing wrong?
EDIT: Also the device from which this was is Oneplus 5