Optimizing IBM Rational Rhapsody in C generated applications
How can I optimize my IBM Rational Rhapsody in C generated applications?
There are two ways to optimize your generated applications in Rhapsody in C. Sometimes these are opposing concerns.
For instance, faster performance may cause an increase in application size, while decreasing application size may cause performance degradation. In general, you can achieve a performance and size improvement from the following:
- Set Instrumentation in the "Configurations::Settings" dialog to "None". This will strip the code of all design level debug statements, and the code will be smaller and run faster.
- Set Statechart Implementation in the "Configurations::Settings" dialog to "Flat", which will result in faster code.
- Set the Build Set in the "Configurations::Settings" dialog to "Release". This will force your environment to construct the application without source level debug information.
- Check your specific environment documentation for other possible effects.
How can I optimize my Rhapsody in C applications for performance?
property to its maximum of 5. This property allows you to specify that Rhapsody in-line operations contain 5 or less (when set to 5) lines of code. Although this increases the overall size of the generated application, you are able to obtain up to a 10% increase in performance over the default setting for the property of 3.
Implement relations as real arrays by setting the "Implementation" property to "StaticArray" or "Scalar" instead of using the default implementation. Although less flexible, the array implementation is simpler and faster. Use a custom implementation of the relation. To do this, create an optimized implementation and make Rhapsody use it by first adding the interface to the "User" metaclass (under the subject "RiCContainers"), and then setting the "Implementation" property for the relation to "User".
How can I optimize my Rhapsody in C applications for size?
Remove unnecessary accessors, mutators, and link methods by setting the properties "AccessorGenerate" and "MutatorGenerate" (SetGenerate and GetGenerate in &.5.3) for attributes and relations to "False". This will prevent Rhapsody from generating the operations, but will require the developer to do this explicitly.
Implement relations as real arrays by setting the "Implementation" property to "StaticArray" or "Scalar" instead of using the default implementation. Although less flexible, the array implementation consumes less space. Do not implement links to global or singleton objects by setting the "Generate" property for the relation to "False". In environments that support it, strip the executable by adding the necessary switch to the Link Switches setting for the configuration (for example: -s in VxWorks).
Using A Post Processor
Starting in Rhapsody 4.2 it is possible to perform post processing of generated code with Rhapsody. This is done through the "
" property. If you want to run a "Beautify" utility, or other such post processing tool, it can now be done on a file by file basis automatically from Rhapsody.
More support for:
Software version: 7.5.1, 184.108.40.206, 7.5.2, 220.127.116.11, 7.5.3, 18.104.22.168, 22.214.171.124, 7.6
Operating system(s): Linux, Windows
Reference #: 1323628
Modified date: 25 June 2007