We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataPager.PagedSource.ResetCache performance

Thread ID:





131888 Aug 1,2017 07:30 PM UTC Aug 2,2017 02:44 PM UTC WPF 2
Tags: SfDataGrid
Luca Spolidoro
Asked On August 1, 2017 07:30 PM UTC

I'm using a pager with sorting, and, as suggested by this page: https://help.syncfusion.com/wpf/sfdatagrid/paging#sorting-complete-collection
I'm resetting the cache for the DataPager.

The problem is that I have a pretty big table of data, and just resetting the cache takes more that 6 seconds:

can you provide an async version of those function or make them perform better?


Luca Spolidoro
Replied On August 1, 2017 08:56 PM UTC

By looking at the IntelliTrace, it looks like the API is doing lots of ADO.NET calls (I wasn't expecting any, since this is just a cache clear).

I'm using Entity Framework and an IQueryable for binding ItemSource, here the full code:

      private MainViewModel vm => (MainViewModel)DataContext;
      private string _lastSortedColumn = "DateLastSaved";
      private ListSortDirection _lastSortDirection = ListSortDirection.Descending;

      private void DataPager_OnOnDemandLoading(object sender, OnDemandLoadingEventArgs args)
            var pageData = _lastSortDirection == ListSortDirection.Ascending ?
                vm.Presentations.OrderBy(_lastSortedColumn) :


        private void PptDataGrid_OnSortColumnsChanging(object sender, GridSortColumnsChangingEventArgs e)

            if (e.Action == NotifyCollectionChangedAction.Add || e.Action == NotifyCollectionChangedAction.Replace)
                var sortDesc = e.AddedItems[0];
                _lastSortedColumn = sortDesc.ColumnName;
                _lastSortDirection = sortDesc.SortDirection;



Gnanasownthari Thirugnanam [Syncfusion]
Replied On August 2, 2017 02:44 PM UTC

Hi Luca, 
We have analyzed your query and we are unable to reproduce the reported issue with your given details, We have tried to reproduce the issue by below steps. 
1.     Navigate all the pages in SfDataPager. 
2.     Try to sort the column. 
3.     In SortColumnChanging event we have cleared the cache. 
4.     While clear the cache it takes 35 ms. 
5.     In our application we have loaded 7000000 records. 
6.     We have checked in Syncfusion product version and 
Kindly provide us your assembly version details which you are using to reproduce the issue along with the Syncfusion.SfGrid.WPF.dll assembly and sample application or complete code snippet to illustrate the workflow for reproducing this issue from our end, thereby we will analyze further and update you with the appropriate solution as much as earlier.  
Gnanasownthari T. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon