Fast filter for LongListSelector

62 Views Asked by At

I have Db for ~5000 items and use LINQ queries to filter output for LongListSelector.

It is not so fast as expected, due to every KeyPress on filter TextBox triggers "search".

Is any recipe or "CookBook" how to do it properly?

2

There are 2 best solutions below

1
Kuldeep On

Instead of filtering all the data. Try to filter the data into bunches, like top 200 or 300 at a time and when user scroll down the list keep on filtering remaining data. I hope this will help you.

0
Timothy Macharia On

I have a better and a much easier suggestions drawing inspiration from ajax and angular js.

When the app gets loaded at first, call an async Task method that will populate your list from the database to a collection in your app which will be a global variable in this case.

Then when you want to search..,only search through the local collection in your app. I tried this one out and its lightning fast.