- Optimize Model Structure: Review the granularity of your model references. Sometimes, too many small model references can lead to overhead that offsets the benefits of parallel builds. Consolidating smaller models or adjusting the hierarchy can sometimes yield better parallelization and efficiency.
- Code Generation Settings: Explore other code generation options in the Configuration Parameters dialog. For instance, enabling or tweaking settings related to code reuse, data type replacement, or inline parameters can impact build times.
- Incremental Builds: Ensure incremental code generation is enabled to avoid rebuilding unchanged parts.
- Local Storage: Use a local drive instead of a network file system to reduce latency.
- Build Profiling: Use Simulink's profiling tools to analyze where the code generation process is spending most of its time. Identifying bottlenecks can help you target specific areas for optimization.
Using Parallel Reference Code Generation with Embedded Coder
조회 수: 15 (최근 30일)
이전 댓글 표시
Hi all,
I am looking to speed up my code gen. I have a large model with several reference models, each of which has references of its own. I checked "Enable parallel model reference builds" to see if I'd get a speed boost. It said I had 6 workers, and I did see a lot of models being built in parallel. However, my overall time was nearly the same as before.
Any tips on what I may do to improve that?
Thanks!
댓글 수: 0
답변 (1개)
Hornett
2024년 9월 18일
To improve code generation speed for a large Simulink model with nested model references, even after enabling parallel builds, consider the following strategies:
Combining these strategies can help achieve significant improvements in code generation times.
Hope it helps!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!