Performance Issue when summing up in CaptionSummary

Hi there,

I have a data grid with somewhere in the region of 40,000 rows and I'm grouping by 4 columns.  Now, I'd like to see the total spend for each SummaryRow but whenever I do so, it takes somewhere in the region of 10-15 seconds for the grid to load.

If I remove the CaptionSummaryRow it loads pretty much instantly.  I've tried to use SummaryCalculationMode="OnDemandCaptionSummary" but it's still just as slow.

Is there anything I can do about this or is it simply down to the number of rows?

Here's the XAML code for the grid:

<grid:SfDataGrid x:Name="gridSpend"
                 ItemsSource="{Binding SpendData}"
                 ColumnSizer="Star"
                 HeaderLinesVisibility="None"
                 AllowResizingColumns="True"
                 GridLinesVisibility="None"
                 ShowColumnWhenGrouped="True"
                 GroupCaptionTextFormat=" {ColumnName}: {Key}"
                 SummaryCalculationMode="OnDemandCaptionSummary">


    <grid:SfDataGrid.GroupColumnDescriptions>
        <grid:GroupColumnDescription ColumnName="Category"/>
        <grid:GroupColumnDescription ColumnName="ResourceName"/>
        <grid:GroupColumnDescription ColumnName="SubCategory"/>
        <grid:GroupColumnDescription ColumnName="Meter"/>
    </grid:SfDataGrid.GroupColumnDescriptions>


    <grid:SfDataGrid.CaptionSummaryRow>
        <grid:GridSummaryRow Title=" {ColumnName}: {Key} - Total Spend: {TotalSpend}" ShowSummaryInRow="True">
            <grid:GridSummaryRow.SummaryColumns>
                <grid:GridSummaryColumn Name="TotalSpend" Format="'${Sum}K'" MappingName="Spend" SummaryType="DoubleAggregate"/>
            </grid:GridSummaryRow.SummaryColumns>
        </grid:GridSummaryRow>
    </grid:SfDataGrid.CaptionSummaryRow>


    <grid:SfDataGrid.TableSummaryRows>
        <grid:GridTableSummaryRow Title=" {TotalSpend}" ShowSummaryInRow="False" Position="Bottom">
            <grid:GridTableSummaryRow.SummaryColumns>
                <grid:GridSummaryColumn Name="TotalSpend" Format="'Total Spend: ${Sum}K'" MappingName="Spend" SummaryType="DoubleAggregate">


                </grid:GridSummaryColumn>
            </grid:GridTableSummaryRow.SummaryColumns>
        </grid:GridTableSummaryRow>
    </grid:SfDataGrid.TableSummaryRows>


</grid:SfDataGrid>

Thanks,

Karl


14 Replies

GS Gokul S Subramani Syncfusion Team July 17, 2024 02:53 PM UTC

Hi Karl,


Based on the information provided, we have checked the reported issue “Performance issue when summing up in the CaptionSummary” on our end, and it is confirmed as a defect. Additionally, we have prepared a sample demonstrating the same error you mentioned. Please review the sample. If the issues are the same, kindly revert to us. If the issues are not the same, please provide the following information, which will be very useful for us to provide a better solution:


- Can you provide a sample in which the issue is replicated?

- If possible, can you replicate the issue using the sample we have provided?


Providing these details will help us better understand the issue and work towards finding a solution promptly.


Thank you for your understanding and cooperation.


Regards, 

Gokul S


Attachment: WpfApp1_8eb355e7.zip


KG Karl Grambow July 17, 2024 03:46 PM UTC

Hi Gokul,


Thank you for the prompt response.  I can replicate the issue with the sample you provided and it behaves in the exact same way that I encountered.


I have another piece of information which may help.  If I change the ShowSummaryInRow property to "false" AND I remove the Title property, it performs as expected.  However, this isn't a viable solution for me because we lose the Summary captions.  But at least it points to the performance issue occurring when ShowSummaryInRow = "True" and there is a Title:

<!--Performance when ShowSummaryInRow="False" is good, as long as the Title property is also removed-->
<syncfusion:SfDataGrid.CaptionSummaryRow>
    <syncfusion:GridSummaryRow ShowSummaryInRow="False">
        <syncfusion:GridSummaryRow.SummaryColumns>
            <syncfusion:GridSummaryColumn Name="TotalSpend" Format="'${Sum}K'" MappingName="SNO" SummaryType="DoubleAggregate"/>
        </syncfusion:GridSummaryRow.SummaryColumns>
    </syncfusion:GridSummaryRow>
</syncfusion:SfDataGrid.CaptionSummaryRow>


MA Manikanda Akash Munisamy Syncfusion Team July 18, 2024 01:53 PM UTC

Hi Karl, 

We are currently analyzing the scenario based on your inputs and need more time to analyze this at our source level. We will provide you an update on July 22, 2024.

Regards,

Manikanda Akash



MA Manikanda Akash Munisamy Syncfusion Team July 22, 2024 03:03 PM UTC

Hi Karl,

We have made improvements in the performance of data operations such as sorting and group expanding/collapsing in our testing. However, we have not yet been able to enhance the initial loading time. We need additional time to analyze this further and will provide you with an update on July 24, 2024.

Regards,
Manikanda Akash M



KG Karl Grambow July 22, 2024 04:38 PM UTC

Hi Manikanda,


Thanks for the update.  That's much appreciated.


Regards,


Karl



MA Manikanda Akash Munisamy Syncfusion Team July 24, 2024 02:23 PM UTC

Hi Karl,
We have checked the reported issue "SfDataGrid with CaptionSummaryRow takes more time for initial loading" on our end and it is confirmed as a defect. And We have logged a bug. We will fix this issue and include it in our NuGet release which is scheduled on August 20, 2024.
You can track the status of this report through the following feedback link,
Note: The provided feedback link is private, and you need to log in to view this feedback.
We will let you know once it is released. We appreciate your patience until then.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
Regards,
Manikanda Akash M


KG Karl Grambow July 24, 2024 02:59 PM UTC

Hi Manikanda,


Thank you very much for the update.  Looking forward to the update, later in August.


Regards,


Karl



GS Gokul S Subramani Syncfusion Team August 20, 2024 01:07 PM UTC

Hi Karl,


We apologize for the inconvenience. As this issue is related to performance, we need additional time to address it. Consequently, we were unable to include the fix for this issue in the NuGet package released today, as promised. However, we will resolve this issue and include the fix in the upcoming main release scheduled for the first week of September 2024.


Regards,

Gokul S



KG Karl Grambow August 20, 2024 03:56 PM UTC

Hi Gokul,


No problem.  Thanks for the update.


Regards,


Karl



GS Gokul S Subramani Syncfusion Team August 21, 2024 01:26 PM UTC

Hi Karl,


Your patience is greatly appreciated.


Regards,

Gokul S



GS Gokul S Subramani Syncfusion Team September 17, 2024 11:47 AM UTC

Hi Karl,


We regret the inconvenience. We are unable to include the fix for this issue in our NuGet package which is released today as promised. We will fix this issue and include it in our Weekly NuGet release which is scheduled on September 30, 2024.


We will let you know once it is released. We appreciate your patience until then.


Best Regards,

Gokul S



SG Santhosh Govindasamy Syncfusion Team September 30, 2024 04:06 PM UTC

Hi Karl Grambow

We apologize for the inconvenience caused. Unfortunately, we were unable to include the fix for the issue in our NuGet package released today, as promised.

The summary is calculated using different approaches depending on whether the "ShowSummaryInRow" option is set to true or false. We are currently evaluating the feasibility of improving performance in this scenario.

We are committed to resolving this issue and will include the fix in our weekly NuGet release scheduled for October 15, 2024.

Regards,
Santhosh.G



SP Sreemon Premkumar Muthukrishnan Syncfusion Team October 15, 2024 03:21 PM UTC

Hi Karl Grambow,


We apologize for the inconvenience caused. Unfortunately, we were unable to include the fix for the issue in our NuGet package released today, as promised.

The reported problem occurs due to the summary calculation being applied to the inner level group of a collapsed parent group. We are currently evaluating the feasibility of limiting the summary calculation to only the summaries displayed in the view.

We will fix this issue and include it in our upcoming weekly NuGet release, scheduled for October 22, 2024. However, if we are able to address this sooner and you require a patch before the scheduled release, could you please provide us with your current Syncfusion version? This will allow us to provide a patch specific to your version.

We will let you know once it is released. We appreciate your patience until then.


Regards,

Sreemon Premkumar M.



SG Santhosh Govindasamy Syncfusion Team October 22, 2024 02:31 PM UTC

Hi Karl Grambow,

We would like to let you know that Essential Studio Weekly NuGet packages (v27.1.55) has been published in nuget.org with the fix for the issue “SfDataGrid with CaptionSummaryRow takes more time for initial loading”.
Please let us know if you have any concerns in this.

Root Cause:
The problem occurs because the summary is calculated for all inner-level groups of a parent group in the view, instead of the visible or expanded groups when the SummaryCalculationMode is set to OnDemandCaptionSummary. We have improved performance by calculating the summary only for the visible and expanded inner-level groups.

Regards,
Santhosh.G


Loader.
Up arrow icon