Hi,
I am using a XamDataGrid that binds to an ObservableCollection. Observable collection is populated using background worker. so everything it gets small amounts of data and adds to the Observable collection. There are approx 700,000 thousand records, when I ran the application. It is throwing an Out of memory exception. I have 4 GB of Ram and also the loading of data is taking longer. say for every 20,000 every 1-2 minutes. How to solve the Out of memory exception and also what is the fastest way of loading Observable collection.
Background worker returns data in data Table. data table is converted to Observable collection and the returned as List. Now the list is sent to call back function so that it is added to the observable collection.
Thanks, Naveen
Hello Naveen,
I just wanted to know if you were able to solve your issue or you still need help? Just send more information about your scenario and I will gladly look at it. Thank you.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hi Dimi,
I am using a background thread for retrieving data. Background thread makes a for loop on the selected types. For each type there can by any number of records. Hence to get the data in pieces. we have used row count. i.e. Every database access will fetch 50,000 records. So each type can have more than 50,000 records. i.e. In for loop there is a while loop that will keep on running until the return count is not equal to 50,000.
Thread connects to WCF service which in turn connects to database.
Now in every while loop we get some data in the form of business object.
Business object is converted to DataView.
DataView is converted as DataTable
DataTable is converted to List of type DataRow.
List of type DataRow is converted to List of Business Object.
List is passed to Callback Method where this list is added to Observable collection.
When data is more than 300,000 there is an memory out of exception error occurs.
Naveen,
I've created a support ticket with a reference number of CAS-52030-1CZNRT so we can further investigate this issue. I will update you shortly on e-mail.