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
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
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>
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
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
Hi Manikanda,
Thanks for the update. That's much appreciated.
Regards,
Karl
Hi Manikanda,
Thank you very much for the update. Looking forward to the update, later in August.
Regards,
Karl
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
Hi Gokul,
No problem. Thanks for the update.
Regards,
Karl
Hi Karl,
Your patience is greatly appreciated.
Regards,
Gokul S
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
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
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.
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
- 14 Replies
- 5 Participants
-
KG Karl Grambow
- Jul 16, 2024 10:42 AM UTC
- Oct 22, 2024 02:31 PM UTC