I received a rather heavy model (.slx ~57Mo, 40k parameters and signals) from a client, and I need to run it several times for test purposes. To run the model, I call a function (e.g. runTest()) that load every parameters and signals and then call sim function. Here is the problem :
When the sim function is called with option SrcWorkspace set to current (i.e. runTest() workspace), the model is stuck at step "Compiling : Evaluating block parameter." for a very long time (hours scale)
However, when I assign all variables in base workspace and I call sim with SrcWorkspace set to base, this step take a reasonable amount of time (minutes scale).
Do you have any idea why calling sim within function workspace slow down the compilation step ?
Best Answer