Many nodes degrades responsiveness

Blazor SfTreeView 18.3.0.42. While investigating a customer complaint I found that the tree was being bound to a collection of 920 self-referential items. Only 2 nodes are at the root level 0, about 6 are at level 1, 20 at level 2 and the remainder at level 3.

Expanding the first root node to show the 6 children takes about 50 seconds. I'm unable to find any changes to the configuration or usage of the tree that will produce better responsiveness. In normal usage the tree is bound to about 80 items and no problems have been reported.

Any advice on how to possibly improve the responsiveness would be most welcome. I have pasted the tree element below.

Greg

----------
<SfTreeView @ref="@TreeToc" TValue="TocNode" LoadOnDemand="true">
    <TreeViewFieldsSettings TValue="TocNode" Id="Id" DataSource="@TocNodesFull" Text="Text" ParentID="ParentId" HasChildren="HasChildren" Expanded="Expanded" Selected="Selected"></TreeViewFieldsSettings>
    <TreeViewEvents NodeSelected="@OnTocSelected" TValue="TocNode" NodeCollapsed="@OnTocNodeCollapsed" NodeExpanded="@OnTocNodeExpanded"></TreeViewEvents>
    <TreeViewTemplates TValue="TocNode">
        <NodeTemplate>
            @{
                var node = (TocNode)context;
                string imgurl = $"img/report/Toc{node.Type}16.png";
                <img src="@imgurl" /> @node.Name
            }
        </NodeTemplate>
    </TreeViewTemplates>
</SfTreeView>

15 Replies

MK Muthukrishnan Kandasamy Syncfusion Team October 29, 2020 01:08 PM UTC

 
Hi Greg, 
 
Thanks for contacting Syncfusion support. 
 
We have validated your reported problem in Blazor TreeView component. We were unable to reproduce your reported problem in TreeView component, the tree nodes does not take more time to render on the DOM.  We have prepared sample for your convenience, in this sample we have added 2 root level nodes, 6 first level node, 20 second level node and 5 third level nodes. Totally we have rendered 1200 nodes. The attached sample can be downloaded from the below link. 
 
 
If the issue still persists, please share some additional details. It will be help us to provide you the prompt solution. 
 
  1. Share us the issue replicating sample or else replicate your reported issue in the shared sample.
  2. If facing any script error, share the screenshots.
  3. Share us the screen recorded video with issue replicating steps.
 
 
Regards, 
Muthukrishnan K 



UN Unknown October 29, 2020 11:23 PM UTC

Thanks for replying so soon and so clearly. I have run your sample project, and it suffers no node expansion delays. Your project and mine are very similar, so I've been carefully comparing them and making incremental changes to see if I can reproduce the problem in your project or remove it from mine. So far I've had no success and all of my changes have no effect on either project.

This suggests that there is some difference in my project or the runtime environment that is causing the node expand delay, but after a couple of hours detective work I've made no progress so far. This is an urgent problem for us, so I will continue working on it and I'll post the results here if I discover anything useful.

Thanks, Greg


UN Unknown October 30, 2020 01:38 AM UTC

I have more information in this issue following another hour of experiments. I am still unable to alter the behaviour of your project or mine. I have noticed in the console log in Edge and Chrome that there is suspicious GC activity during the delays. I have pasted below the log and my comments during the time an expand request is made and the UI has fully responded.

12:28:22.315 Trace 0 #### OnTocNodeExpanding Id 71
(1 minute pause)
[Violation] 'mouseup' handler took 66482ms
L: GC_MAJOR_SWEEP: major size: 3680K in use: 124843K
L: GC_MAJOR: (LOS overflow) time 42.51ms, stw 42.52ms los size: 4096K in use: 1123K
L: GC_MINOR: (LOS overflow) time 0.29ms, stw 0.34ms promoted 0K major size: 3680K in use: 1212K los size: 4096K in use: 1123K
dotnet.3.2.0.js:1 [Violation] 'setTimeout' handler took 50ms
12:29:28.831 Trace 0 #### OnTocNodeExpanded Id 71
(several seconds pause)
[Violation] 'requestAnimationFrame' handler took 7974ms
(tree UI is now expanded)
L: GC_MINOR: (Nursery full) time 0.60ms, stw 0.61ms promoted 16K major size: 11552K in use: 10289K los size: 11264K in use: 8221K

The Expanding event is raised immediately and there is a 1 minute pause.
GC messages appear and the Expanded event is raised.
After several seconds the UI updates to show the expanded child nodes.

Thanks, Greg


SP Sowmiya Padmanaban Syncfusion Team October 30, 2020 03:08 PM UTC

Hi Greg Keogh,  
 
In chrome browser console, there is no warning occurs for expanding the TreeView nodes in our previously shared sample. Could you please share us your issue replication details, to validate it from our end. 
 
If possible, share us your issue replicating application. It will help us to check your reported problem and to share you the solution to resolve your reported problem at the earliest. 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 



UN Unknown November 17, 2020 06:54 AM UTC

Hello Sowmiya,

The problem with slow responsiveness for a tree contain more than a few hundreds nodes is still very serious and is preventing a new product release.

As I said in my last posts on Nov 29 and 30, the sample solution you sent me with 1200 nodes responds quite quickly. However, my tree without 1000 nodes is still incredibly slow: it can take 60 seconds to simply expand a node with 4 children. The slowness is directly correlated to the number of nodes in the tree. When there are less than 100 nodes the response is quick, as the numbers grow the responsiveness gets worse and worse. I spent many hours comparing your sample and my app to try and make either one change behaviour in any way, but absolutely nothing I tried made any difference whatsoever.

I will have to take your offer to share my project with you so you can replicate and possibly diagnose the problem. I will prepare a working stripped-down version of the project and send a zip to you. How can I give you a zip while keeping it private between myself and Syncfusion? Is the post Attach file feature private?

Thanks, Greg


SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team November 17, 2020 07:25 AM UTC

Hi Greg, 
 
Query: How can I give you a zip while keeping it private between myself and Syncfusion? Is the post Attach file feature private? 
 
Please send the file to [email protected]. The files shared will be confidential and will be used only to replicate the issue. Please mention this forum id (159129) with the title (Many nodes degrade responsiveness in SFTreeView) in the subject line. 
 
Once you share your sample with us, we will validate your reported problem and provide you with a prompt solution to solve it. 
 
Regards, 
Shameer Ali Baig S. 



SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team November 19, 2020 02:36 PM UTC

Hi Greg, 
 
Thanks for sharing your sample. 
 
We have validated your reported problem and found that you rendered the TreeView component in Client-side Blazor application. We have confirmed your reported problem as bug. We will include the fix for this issue in our upcoming Volume 4 release which is expected to be rolled out by the end of December 2020. 
 
You can track the status of this issue fix using the following feedback link. 
 
 
We appreciate your patience. 
 
Regards, 
Shameer Ali Baig S. 



UN Unknown December 28, 2020 09:35 PM UTC

Can someone please provide an update on this issue please and perhaps provide a good estimate of the fix release date? The performance problem was reproduced on 19-Nov and a fix was scheduled for "late December 2020". Following a link to issue 19500 I see the release date seems to have been extended to Vol 4 2020 - SP (Jan, 2021).

Our product preview has stalled and a customer is waiting for the fix and needs to be notified of progress.

Thanks, Greg


SP Sowmiya Padmanaban Syncfusion Team December 29, 2020 12:55 PM UTC

Hi Greg Keogh, 
 
Sorry for the inconvenience. 
 
Due to some technical complexities, we were unable to include this fix in Volume 4 release, 2020. 
 
We are currently working to fix this issue with high priority. This fix will be included in the Volume 4 SP1 release which will roll out within the end of January 2020. 
     
We appreciate your patience.     
 
Regards,  
Sowmiya.P 



UN Unknown February 1, 2021 11:29 PM UTC

Is there any news on the release date for the fix for this performance issue?

We're past Jan 2021 now and we have a customer who's been waiting for this fix for 3 months.

Thanks, Greg


KR Keerthana Rajendran Syncfusion Team February 2, 2021 05:12 AM UTC

Hi Greg, 
  
We are glad to announce that our Essential Studio 2020 Volume 4 SP release v18.4.0.39 is rolled out and is available for download under the following link.  
  
  
In this release, we have improved the “Performance of the TreeView component”. Please upgrade your package to latest version (18.4.0.39) to resolve the performance issue.  
  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
 
Regards, 
Keerthana.  



UN Unknown February 3, 2021 01:34 AM UTC

I updated the Syncfusion.Blazor package from 18.3.0.50 to 18.4.0.41, which is a weekly release just ahead of the one you linked to. I also obtained a new licence key. I cleaned the solution and rebuilt it in Release mode without any code or data changes.

I must sadly report that the performance has become much worse. It previously took approximately 60 seconds for a node to open. After updating, the same response consistently takes about 160 seconds.

Around 18-Nov-2020 I emailed a skeleton of my solution to your support team and they used it to confirm the performance problem in the Wasm app. Can you please compile that solution with the latest package and see if the performance has changed?

Thanks, Greg


IL Indhumathy Loganathan Syncfusion Team February 3, 2021 01:46 PM UTC

Hi Greg, 
 
Sorry for the inconvenience.  
 
We have included the fix for the performance delay at TreeView node selection and not for the node expanding scenario. We will include this fix in our patch release which will be rolled out by mid of February 2021. You can track the status of your reported problem through the below portal link, 
 
  
We appreciate your patience. 
 
Regards, 
Indhumathy L 
  
  



JV Jeff Voigt April 7, 2022 07:41 PM UTC

I've been following this thread and am another member awaiting the performance fix.  What is the status of this?  I have a tree with only 343 nodes at various levels and the performance to bind it while the root node is collapsed takes seconds after the data has been retrieved from the server.  I too am running this as a Blazor Client (Web Assembly) project.



IL Indhumathy Loganathan Syncfusion Team April 11, 2022 04:13 PM UTC

Hi Jeff,


The mentioned feature has been included in our 19.1.0.54 package version. To access this fix, we suggest you update your packages to the latest version. We would also like to inform you that we have included some major changes in our latest 20.1.47 version to provide better performance over the JavaScript Isolation approach.


https://blazor.syncfusion.com/documentation/release-notes/20.1.47?type=all#breaking-changes


Please check this shared details and get back to us if you need any further assistance.


Regards,

Indhumathy L





Loader.
Up arrow icon