Why model compilation takes more time for first compilation than subsequent?

4 次查看(过去 30 天)
I tried compiling different models concecutively and observed that second compilation takes more time than first. I would like to know why it is happening. I observed that for some models 'slprj' folder is created and if I delete it simulation takes longer time but all models are not generating 'slprj' folder.

回答(1 个)

Jesús Zambrano
Jesús Zambrano 2020-2-7
Hi Jithu,
The slprj folder contains information about workspace variables and build artifacts. If your Simulink model includes model references in accelerated mode, Simulink first builds the compiler version of that model. This only happens once, unless you change the model. When referencing models in accelerated mode, only the compared version of the model is loaded, which reduces the memory used and it can also potentially increase the simulation speed.
Best,
Jesús

类别

Help CenterFile Exchange 中查找有关 Create Large-Scale Model Components 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by