Closed KonradHoeffner closed 5 years ago
The problem seems to be CPU dependent, in that a slow machine can't calculate enough layout cycles in the time limit. A Intel Pentium G2030 @3.00GHz is too slow, while an i7-4790 @ 3.6GHz seems to do fine. Change the time limit to a cycle limit.
On the i7-4790, the following values look great, however they take the full 40 seconds:
export const euler =
{
/*eslint no-unused-vars: "off"*/
name: "euler",
springLength: edge => edge.data("springLength")?edge.data("springLength"):800,
animate: true,
refresh: 50,
maxSimulationTime: 40000,
maxIterations: 1000,
timeStep: 40,
randomize: true,
movementThreshold: 1,
fit:true,
mass: node => node.data("mass")?node.data("mass"):40,
};
The timestep was changed from the default (20?) to 40, the max simulation time to 40s and the max iterations to 1000.
500 iterations with a timestep of 80 looks good as well and takes 27 seconds on the i7-4790.
On the G2030 it takes 50 second to start SNIK Graph and calculate the layout but at least it looks good now.
Especially the circle around entity type is too cramped.
See commit https://github.com/IMISE/snik-cytoscape.js/commit/8939a6594f0a4860fc5b8a55e0fd8fb8997f7f91, on how to change the layout parameters.