Hi coworker the problem seems to be found and solved mostly by some modifications.
The survey done on ProcessMaker v3.2.1.0 .
After profiling js cpu timing that you can see here:
Js Profiling 2.jpg (105.13 KiB) Viewed 4150 times
I found tow suspect!
First I disable lane updates on move and drop on line 84940:
Code: Select allPMLane.prototype.updateAllRelatedDimensions = function (avoidWeight) {
//this.parent.updateAllLaneDimension(avoidWeight);
//this.parent.paint();
return this;
};
Then add a timer to prevent fast re-rendering on move on line of 71824 :
Code: Select allPMCustomShapeDragBehavior.prototype.updateAndRepaintPositions = function (options) {
clearTimeout(this.updateTimeout);
this.updateTimeout=setTimeout(function(){
var j,
port,
connection,
customShape = options.customShape,
sibling = options.sibling;
// move the segments of this connections
for (j = 0; j < customShape.canvas.sharedConnections.getSize(); j += 1) {
connection = customShape.canvas.sharedConnections.get(j);
if (connection.srcPort.parent.getID() ===
sibling.getID()) {
// to avoid moving the connection twice
// (two times per shape), move it only if the shape
connection.move(options.diffX * customShape.canvas.zoomFactor,
options.diffY * customShape.canvas.zoomFactor);
}
}
for (j = 0; j < sibling.ports.getSize(); j += 1) {
//for each port update its absolute position and repaint its connection
port = sibling.ports.get(j);
connection = port.connection;
port.setPosition(port.x, port.y);
if (!customShape.canvas.sharedConnections.contains(connection)) {
connection
.setSegmentColor(PMUI.util.Color.GREY, false)
.setSegmentStyle("regular", false)// repaint: false
.disconnect()
.connect();
}
}
},300);
};
and line of 72010:
Code: Select allPMCustomShapeDragBehavior.prototype.onDragEnd = function (customShape) {
var command,
self = this;
return function (e, ui) {
clearTimeout(self.dragTimeout);
self.dragTimeout=setTimeout(function(){
// call to dragEnd procedure
self.dragEndProcedure(customShape, true, e, ui);
customShape.dragging = false;
// hide the snappers
customShape.canvas.verticalSnapper.hide();
customShape.canvas.horizontalSnapper.hide();
if (!customShape.changedContainer) {
if (customShape.parent.getType() === 'PMLane') {
command = new PMCommandMoveInLane(customShape.canvas.currentSelection);
} else {
command = new PMUI.command.CommandMove(customShape.canvas.currentSelection);
}
command.execute();
customShape.canvas.commandStack.add(command);
}
customShape.changedContainer = false;
// decrease the zIndex of the oldParent of customShape
customShape.decreaseParentZIndex(customShape.oldParent);
// force to apply zoom, when move more than two figures
if (customShape.getCanvas().getCurrentSelection().getSize() > 1) {
customShape.getCanvas().applyZoom(customShape.getCanvas().getZoomPropertiesIndex() + 1);
}
customShape.getCanvas().emptyCurrentSelection();
},300);
};
};
And after applying those changes the designer works and it is responsive when move objects on complex processes.
you get the final modified js here:
final file (5.74 MiB) Downloaded 239 times
Have Fun