performance regression when programmatically creating a model using add_block

Why do we observe such large difference in the time taken in R20016b to create a large Simulink model using MATLAB scripts (copying 40 existing models block by block, line by line) as compared to R2013b?

 Réponse acceptée

Adding many blocks to a Simulink model can be slow, such as when you use add_block in a MATLAB script, or copy and paste many blocks.
To diagnose this problem, use the MATLAB profiler to profile the MATLAB script or the copy-paste operation. In the profiler report, this problem manifests as a disproportionately large number of calls to the function getHarnessList.
This is a bug which was fixed. A  bug report is available <https://www.mathworks.com/support/bugreports/1707278>.
A patch for this bug as well as instructions to install it are provided in the bug report.

Plus de réponses (0)

Catégories

Produits

Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by