Several ways to improve the performance of Model RealTime

December 12, 2017

Working with production models usually means large number of models/projects in the workspace, complex structural dependencies between components, and as the outcome extra requirements on tool performance and memory usage. Here are several ways how you can improve the performance of Model RealTime when working with large models:

Use correct build options

Depending on your workflow, you can select different ways how to build your Transformation Configuration (TC) in the most efficient way. For example, if you just want to make sure your transformation is valid, or review generated code, you can save time on skipping the build step. Press the TC editor button to run UML to Real-Time C++, or mark the check box to Skip build of generated projects option in the build dialog.
In case if you make some changes in the model or in the code itself – do not use clean before rebuilding, instead run Build directly – it takes into account only modified resources related to your TC.
Consider using the Context sensitive library build option (available in the TC editor) to enable closure analysis of sources of your TC and as the result include only those which relate to the scope of the input TC.
Finally, disable UML Development -> Real Time C++ Transformations -> Report details about automatically added source elements to increase console output speed.

Adjust workspace preferences

The Clean TC command which has large number of generated projects usually invokes rebuilding of C/C++ indexer which may influence on the performance. Enable the following options to make the clean faster:

Opening heavy generated source in the C/C++ editor, could slow down the user interface due to the large number of lines that need to be analyzed for syntax highlighting and displaying project markers. Review the editor scalability options available to disable advanced parsing when opening such files.

Make sure Code Analysis preferences are turned on only if you run build with UML Development -> Real Time C++ Transformations - > Generate additional information for Code Analysis option (see Model RealTime release information for when it is recommended to use this CDT feature).

Review C/C++ Indexer cache limits on the Indexer preference page. Consider increasing the percentage of heap size and cache limits.

Go to Preferences -> Model Validation and turn off the preference Include live warnings. Next, go to the Constraints page and disable as many of the validation constraints as possible. Disabling a constraint prevents it from executing both in live and batch mode. It is therefore a good idea to enable validation constraints sometimes to ensure that the model complies with both standard UML constraints and RT specific constraints. It is not possible to prevent a constraint from executing only in live mode, which is what is required to improve editing performance

Model RealTime supports displaying and editing rich text in diagrams and the Properties view. By default, this support is turned on, which means that the rich text editor is instantiated every so often when you are working in the user interface. This takes some time, especially on systems with a large number of fonts installed. It is recommended to turn off the support for rich text, unless you need it. The preference to disable is Modeling -> Text -> Enable rich text editor.

If you work with Git, review automatic refresh interval depending on your access to remote repository:

Build search index in advance

Most search features in Model RealTime make use of a search index. This search index is built the first time it is used, typically the first time you perform a search in a new workspace or load a model. After that, it is only updated (synchronized) when necessary. If you use the command Load UML Models, you can also synchronize the index automatically when the models are loaded. If you choose to do this, you have to wait a little longer for the Load UML Models to complete, but the index is up-to-date, which makes subsequent searches faster. Remember that the search index is stored in your workspace metadata. You should avoid deleting your workspace too often, as this means the search index must be recreated in the new workspace.

There are more recommendations on performance to read here. Do you know more? Share your knowledge with us by mailing to model-realtime@hcl-software.com.