I have a collection of (thousands)data already save in my isolated storage. The problem is, after I get the collection from it and bind it to my listbox, the loading was so slow. What is the best way to handle this situation?
I have a collection of (thousands)data already save in my isolated storage. The problem
Share
The best way to be fast is to not work with collections containing thousands of items.
Which part is slow?
If it’s reading from IsolatedStorage, read less.
If you don’t need all the data put it in smaller files (divide up the data) and only load the files as you need them, not all the data at once. Depending on the data and the application will affect how and if this can be done.
If it’s loading large amounts of data into a ListBox, dont.
The ListBox isn’t designed to hold thousands of items.
From a usability point of view it’s very hard to find specific items in a very large list. Especially when you can only see a very small number of items (on screen) at once.
Consider using a LongListSelector or virtualize the list to improve performance.
I’d strongly recommend a different app design which doesn’t need a long list though.