What the REALbasic compiler can do on optimization
Issue: 7.1 (November/December 2008)
Author: Christian Schmitz
Article Description: No description available.
Article Length (in bytes): 3,348
Starting Page Number: 44
RBD Number: 7116
Resource File(s): None
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Because REALbasic is not necessarily used for serious number crunching, you might think there is no need for REALbaisc to have a highly optimized compiler. Still REALbasic does have a few optimizations.
The REALbasic linker does not include plugins, classes, and methods in the final application which are not used. This is the reason why you can compile a 5 MB application while you have 150 MB worth of plugin files in your plugins folder. Also REALbasic internal classes are stripped from your application if you don't use them: for example, the EmailMessage class.
If you create a project and you add a class "testClass" and inside a method "testMethod", you will see this: The application size will be nearly equal to an empty project, because REALbasic did not include this test class. I do not know why the application compiled from source code with testClass is still a few bytes bigger.
If you have a new project and you add a method to the default window, this method will be included with your application. If you add a method to a class in your application, you can see a difference: if you don't use the class, the whole class is stripped. If you use the class, both the class and its method are linked into the application, even if the class method is never called.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.