Improving Compilation Performance
Optimization techniques for speeding up compilation of large models include scalable compilation, incremental compilation, and memory caching for model compilation artifacts.
Scalable compilation helps reduce compilation time for models that consist of a pattern of repeated components, such as transmission lines or battery packs, by compiling a repeated component once and then reusing these compilation artifacts for other instances of the same component. Scalable compilation improves compilation performance, it does not reduce the simulation time of the model.
Incremental compilation reuses compilation artifacts of reusable components for subsequent compilations within the same MATLAB® session, unless the component has been modified between simulation runs. Incremental compilation and memory caching result in improved performance for repeated model simulations and block diagram updates.
Memory caching is performed automatically. To take advantage of scalable and incremental compilation, you need to designate reusable components and enable component reuse.
- Enable Component Reuse During Compilation
Workflows, techniques, and examples of speeding up compilation of large models.
- Reuse Compilation Artifacts of Individual Simscape Blocks
Speed up compilation by selectively reusing artifacts of individual blocks for scalable compilation.
- Reuse Compilation Artifacts of Textual Components
Speed up compilation of models that use complex textual components.
- About Scalable Compilation
General workflow and types of models that can benefit from scalable compilation.
- Prepare Your Model for Scalable Compilation
This example shows how to evaluate a model and prepare it for scalable compilation.
- Determine Optimal Complexity Level for Reusable Components
Guidelines and considerations for determining the optimal model configuration for scalable compilation.