Thanks for the numbers, I will try to describe what can be down to work around the time to results.
From when you start the simulation to the first scope popup, the schema is converted to a list of functions to be called in a specific order and passed to a solver that will iterate on time to “run” the simulation. There might be a difference between Scilab 5 and Scilab 6 as this transformation is written using the Scilab language. It is the 5s to 95s ratio.
While the simulation is running, each block’s simulation function is called a number of times. The solver/simulator/function API did not change between Scilab 5 and Scilab 6, this should perform the same way. However, some functions, especially sciblk2 and sciblk4 are wrappers from C to Scilab functions and have been re-written to behave very differently. It is the 253s (258-5) to 4258s (4353-95) ratio (lower ratio but much more impact).
Could you please file a bug with some representative example (same number of blocks, similar Scilab function) for further investigation ?
Note: having “costly” sciblk2 and sciblk4 also highly depends on your schema, for example having them on a continuous loop will make the solver call them on each timestep.
From: Perrichon <[hidden email]> Sent: Monday, March 2, 2020 11:09 AM To: 'Users mailing list for Scilab' <[hidden email]>; Clément David <[hidden email]> Subject: RE: [Scilab-users] Xcos 6.1.0 - benchmark time test
Yes, I have some function blocks and expression blocks.
Must I understand that I have to write CBLOCK for scilab function or scilab expression or both ?
Here are other results for a more complex project name PELT1
Time request : 100 s
Xcos Scilab 5.5.2 :
Durée de la simulation : 258.3 s
Xcos Sciab 6.1.0 :
Durée de la simulation : 4353.4 s
So the ratio is 16.8 for PELT1
Other information :
Scilab 5.5.2 : time between click go and first scope on the screen = 5 s
Scilab 6.1.0 : time between click go and first scope on the screen = 95 s
…and I also have other projects more complex
Pelt1 is for 1 needle (2 positonning loop)
Perlt6 for 6 !!! (7 positonning loop)
De : users <[hidden email]> De la part de Clément David Envoyé : vendredi 28 février 2020 10:10 À : Users mailing list for Scilab <[hidden email]> Objet : Re: [Scilab-users] Xcos 6.1.0 - benchmark time test
Are you using a block with its simulation function implemented in Scilab? Any C/C++ implemented block might perform the same at simulation time.
In 6.0.2, implementing Xcos blocks using the Scilab language had some performance issues. In 6.1.0, I tried to speed up things a little bit by reusing some allocated data structure during simulation time  ; more work might still be needed here.
From: users <[hidden email]> On Behalf Of Perrichon Sent: Friday, February 28, 2020 8:51 AM To: 'Users mailing list for Scilab' <[hidden email]> Subject: [Scilab-users] Xcos 6.1.0 - benchmark time test
Here I test a PELTON basic algorithm under xcos, and record with tic-toc the simulation real time.