Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2320
RemoveRange Performance questions
posted

I have an XamGrid with large amounts of data (only a couple columns, but potentially 100,000 or more rows).

Using XamGrid.Rows.RemoveRange but having performance issues...

I've drastically improved performance by doing 3 things so far

Clear SelectionSettings.SelectedRows (store in separate List so I know what to remove)

Clear filters (grid.FilteringSettings.RowFiltersCollection) (store in List)

Clear sort columns (grid.SortingSettings.SortedColumns) (store in List)

call RemoveRange

Then readd filters and sort.

This seems to improve performance when deleting but I'm currently down to 5000 rows in 24 seconds.  Is there anyway to improve this further?  Is there anyway to temporarily deactivate binding or grid updating while I remove rows from the underlying collection?

I tried setting grid.ItemsSource to null thinking I could then work with the collection, and then reassign it at the end but setting ItemsSource to null, also nulled out the underlying collection.

Any ideas would be appreciated.  The speed isn't horrible but I think it could be improved.

 

Parents
No Data
Reply Children
No Data