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?

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 2월 14일
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.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품

릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by