Article Preview
Buy Now
COLUMN
Optimizing REALbasic
Tips & Tricks for Performance Optimizations
Issue: 4.1 (September/October 2005)
Author: Hank Marquis
Author Bio: Hank Marquis is the creator of Extreme Optimizing (
Article Description: No description available.
Article Length (in bytes): 11,187
Starting Page Number: 44
Article Number: 4121
Related Web Link(s):
http://www.extremeoptimizing.com
http://www.slayfire.com
http://www.slayfire.com/OptimizerScience/speedtest7.html
Excerpt of article text...
This new column covers REALbasic (RB) performance optimization strategies to help you optimize the speed, resource requirements, and usability of your REALbasic applications. Each column shows you some tips, tricks, and techniques to speed up your Mac, Windows, and Linux applications.
Choosing the correct combination of keywords and syntax is optimization, and as a developer you only really have control over the code you write. Other factors such as network or disk are also common factors in REALbasic application performance. Most REALbasic applications are slowed by the actual processing speed of the code you have written. Even so, you can often find many points in your application where the speed of your code is the controlling factor, especially for routines that are called frequently or in loops. There are no less than eight ways to program a loop in Basic (Goto, Do...Loop, Do While...Loop, Do Until...Loop, Do...Loop While, Do...Loop Until, While...Wend and For...Next). Which one is fastest? The answer? It depends!
How about Select Case? Using a string as the compare item is much slower than using the Asc() value. The same with testing for greater than, less than, or equality as well. Only one works best for a given situation, and if you apply yourself, and apply sound programming skills, the result using REALbasic equals or betters the result using another language. The important thing to understand is that the assumption that REALbasic must be less efficient, larger, or slower than some other language is dead wrong.
While a list of common optimizations is handy, I am going to introduce you to a method for writing and maintaining code that includes optimization as part of the normal development process: Extreme Optimization (XO.)
Extreme Optimization
XO consists of approaching optimization using a number of easy steps any RB developer can take to improve the performance of any application. XO derives from opportunistic optimization -- finding and fixing the 20% of your code responsible for the 80% of performance problems. XO says:
...End of Excerpt. Please purchase the magazine to read the full article.