Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit ac7fbb78030c6510b38ff3fd649060aaa55c26ed
Author: Chris Craik <ccraik@google.com>
Date: Mon Nov 06 15:00:24 2023
Improve RecyclerView trace detail, and trace if prefetch needed for next frame
Fixes: 309523615
Test: Sample benchmark app, scrolling + tracing with Studio
Test: GapWorkerTest
Relnote: "Add type to RecyclerView bind/create trace sections, and
label RV prefetches as 'forced - needed next frame' if they are
expected to be used by the next frame, and thus should start work as
soon as possible."
The OS has started more regularly tracing additional context in trace
sections (e.g. input IDs), and Perfetto is generally pretty robust at
ignoring these for color consistency. For the bind/create type hex, we
consider this debuggability worth the extra string formatting cost.
Also switches relevant TraceCompat calls to Trace calls where
possible, but this isn't all since Trace.isEnabled is API 29, and
fully switching to androidx.tracing is a larger change.
Change-Id: I8ec3edb569d892fcb100c86e401d95a32e844d29
M recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/GapWorkerTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/GapWorker.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
https://android-review.googlesource.com/2816631
Branch: androidx-main
commit ac7fbb78030c6510b38ff3fd649060aaa55c26ed
Author: Chris Craik <ccraik@google.com>
Date: Mon Nov 06 15:00:24 2023
Improve RecyclerView trace detail, and trace if prefetch needed for next frame
Fixes: 309523615
Test: Sample benchmark app, scrolling + tracing with Studio
Test: GapWorkerTest
Relnote: "Add type to RecyclerView bind/create trace sections, and
label RV prefetches as 'forced - needed next frame' if they are
expected to be used by the next frame, and thus should start work as
soon as possible."
The OS has started more regularly tracing additional context in trace
sections (e.g. input IDs), and Perfetto is generally pretty robust at
ignoring these for color consistency. For the bind/create type hex, we
consider this debuggability worth the extra string formatting cost.
Also switches relevant TraceCompat calls to Trace calls where
possible, but this isn't all since Trace.isEnabled is API 29, and
fully switching to androidx.tracing is a larger change.
Change-Id: I8ec3edb569d892fcb100c86e401d95a32e844d29
M recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/GapWorkerTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/GapWorker.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
pr...@google.com <pr...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.recyclerview:recyclerview:1.4.0-alpha02
Description
We should improve tracing here, at minimum:
- make it clear when prefetch ignores gap deadline, since expected to be used next frame
- show viewtype
Hopefully this will clarify why many prefetches appear invalid. We can add further details as needed.