Page 1 of 1

remoteAPI slow stop

Posted: 30 Sep 2019, 13:25
by nex
Hello,

When I run a simulation that uses the remote API it takes always quite long to stop after pressing the stop button, while it is pretty snappy without using the remote API.

This is even if all clients are terminated (or none were running in the first place).

Is there a trick to add some code to child scripts that this termination becomes faster? It gets a bit in the way while doing many tests in a quick sequence.

Re: remoteAPI slow stop

Posted: 01 Oct 2019, 05:56
by coppelia
Hello,

if you have some threaded scripts, then you could slightly speed-up start with something like:

Code: Select all

while sim.getSimulationState()~=sim.simulation_advancing_abouttostop do
    ...
end
Cheers