cancel
Showing results for 
Search instead for 
Did you mean: 

Performance Impact on sap.m.tree

Sriharsha_C
Employee
Employee
0 Kudos

Performance issue:
When the records are more than 20000 in the JSON model. Tree loading took more than 2 and half minutes.

Control name: sap.m.tree
Kindly check sample Code below: 
here is the link to the snippet (in snippix):
https://snippix.only.sap/snippets/326394

To launch the page directly, go to:
https://snippix.only.sap/snippets/326394.html

Sriharsha_C_0-1716370502131.png

Kindly check the screenshot attached.

Your assistance in resolving this matter is greatly appreciated. Thank you for your time and support.
If this cannot be fixed, please suggest the alternatives or workaround.

Best regards,
Sriharsha

junwu
Active Contributor
0 Kudos
why not using treetable? even with m.tree, it only took 30 seconds for me.
mchrista
Participant
0 Kudos

First, from the SAP Fiori Design Guidelines m.tree shall only be used up to 200 items and a maximum of 12 levels. You are far above that. In addition to the treetable solution suggested before, I could also imagine to use a flexible column layout and display lower levels on the object page. Of course, it strongly depends on the use case.

For the performance issue. More than 2 minutes seems to be way to long. Did you check if the backend is performing appropriately?

View Entire Topic
Sriharsha_C
Employee
Employee
0 Kudos

@mchrista 
From backend we get the response in 10 seconds, but it takes 2 minutes in the frontend.

https://snippix.only.sap/snippets/326394.html
In Above sample, there is no backend involved, just hardcoded the JSON with 20000 items and then using the sap.m.tree to load.