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

4 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Jesús Zambrano
Jesús Zambrano il 7 Feb 2020
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

Categorie

Scopri di più su Create Large-Scale Model Components in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by