Thank you so much for the help so far!
Yes, it was my original code. In this way, all the parent links are created, but I get fully frozen for the entire processing.
I also wrapped the “addNodeDataCollection” inside a transaction like the following, but like you said, probably this is not the only problem. I’ve tried using transactions from both “diagram” and “diagram.model”. I’ve noticed that some nodes are correctly placed below their parents, but not all of them.
`
function includeOnView(diagram, allPositions){
var start = diagram.model.nodeDataArray.length;
var end = start + quantity;
diagram.startTransaction('update');
diagram.model.addNodeDataCollection(allPositions.slice(start, end > allPositions.length ? allPositions.length : end));
diagram.commitTransaction('update');
if (allPositions.length > diagram.model.nodeDataArray.length){
setTimeout(function(){
includeOnView(diagram, allPositions);
}, 1);
}
}
includeOnView(self.diagram, allPositions);
`