Why is the graphics layer block very laggy unless ...
# compose
k
Why is the graphics layer block very laggy unless I add
compositingStrategy = CompositingStrategy.Offscreen
? There is only
translationY
modification in the block. It even happens for a very simple nonlazy scrollable layout in release mode. I inspected the HWUI render bar, there was no overhead, all lines were under the yellow line, without
Offscreen
. I wonder which causes the lag.
Or is it the problem of custom overscroll? I can see there is a small discontinuity of time when overscrolling.
I think it's a problem of
applyToFling
, when the content already reached boundary,
performFling
will still give a nonzero velocity, which is expected to be zero.