AndroidDeveloperLB / LollipopContactsRecyclerViewFastScroller

A sample of how to mimic the way that the contacts app handles a Fast-Scroller for a RecyclerView
Apache License 2.0
540 stars 95 forks source link

Drawing performance is very low when scrolling very fast using FastScroller #12

Closed hardysim closed 8 years ago

hardysim commented 8 years ago

When enabling the GPU Profiler on-screen bars we'll see the drawing performance. It stays nicely below/around the 60fps-mark when scrolling the RecyclerView directly.

But when using the FastScroller very fast, it'll show spikes and the app gets really laggy. This does not happen when scrolling slowly using the FastScroller.

This does not happen when scrolling fast using a fling on the RecyclerView itself.

It also does not happen in the standard-contacts-app (but I think they're using ListView?).


Does anyone have an idea on this issue?

AndroidDeveloperLB commented 8 years ago

Good question. It does show spiked, but I don't see it get laggy. About the contacts app, I don't know.

davideas commented 8 years ago

Hello @hardysim, in my library I've added this base FastScroller, with thousands of items (normal, not with pictures...) it is smooth, I don't see any lags.

AndroidDeveloperLB commented 8 years ago

@davideas But do you see spikes in the GPU graph?

davideas commented 8 years ago

@AndroidDeveloperLB, yes I see them even if we are scrolling really fast from one small position to a high position and viceversa, but it's not laggy anyway.

hardysim commented 8 years ago

OK, I looked more into it and I came to the conclusion that "really" laggy might be too much ;-) It gets the spikes and it gets some sort of lag but not that laggy that it's not usable anymore.

It seems that this sort of lag is not related to the lib but to the system itself (it has to render much more in such a case than when simply scrolling using a fling).

I'll close this here. Thanks for the feedback.