collapseAll() too time consuming

Hi, is there a workaround to fasten the collapseAll() function on Treegrid or directly load a collapsed Treegrid?
I need to perform the collapseAll() right after loading the Treegrid.

var treegrid = new dhx.TreeGrid(“treegrid_container”, {
selection:“complex”,
data: res.rows,
headerRowHeight: 50,
height:910,
htmlEnable: true ,
autoWidth:true,
resizable: true
});
treegrid.setColumns(columns);
treegrid.collapseAll();

There is no other way to collapse all the items in the tree grid but the collapseAll() method:
https://docs.dhtmlx.com/suite/treegrid/api/treegrid_collapseall_method/
Could you please, provide a complete demo or a demo link, where the performance problems could be checked.