jho
jho

Reputation: 243

Xamarin.Forms ListView scrolling slow and jerky

I have a ListView with 1 million records.

I can preload the ListView from a flat file or database (about 8 secs).

Or, load 1 million empty records into the ListView (about 1 sec), and then populate the values on the fly when ItemAppearing().

I choose the latter and it works well for Xamarin Forms 3.3.

As soon as I upgrade past 3.3 however, the scrolling becomes slow and jerky. I've tried multiple versions of upgrades over the past year and all have the same problem, meaning I'm stuck on 3.3 and am missing out on any of the benefits of later versions.

Anyone know why this might be occurring and how I might fix it. Or can anyone suggest a better design I could try.

(My listview items are actually also crashing with an object disposed error occasionally when the app is brought back into memory after being unloaded, but if I was able to upgrade, I suspect this problem might go away.)

Upvotes: 0

Views: 1139

Answers (1)

George Isaac
George Isaac

Reputation: 589

1 million records is a lot of records. You should go for pagination. For smooth scrolling of listview you should set CachingStrategy="RecycleElement"

Upvotes: 2

Related Questions