remoteAPI slow stop

Typically: "How do I... ", "How can I... " questions
Post Reply
nex
Posts: 28
Joined: 07 Nov 2016, 15:48

remoteAPI slow stop

Post by nex » 30 Sep 2019, 13:25

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.

coppelia
Site Admin
Posts: 7388
Joined: 14 Dec 2012, 00:25

Re: remoteAPI slow stop

Post by coppelia » 01 Oct 2019, 05:56

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

Post Reply