Language: Visual Basic
Jul 29, 1997
Don't Auto-Optimize for Fast Code
If you take a look at VB's native code optimization options for the first time, you might be tempted to click on "Optimize for Fast Code" right away. Strange as it may sound, though, this does not always guarantee the best performance. Applications optimized for performance generally don't run that much faster, but do have a larger memory footprint. This causes them to load slower, especially on memory-constrained machines, giving the user the impression that your app is actually slower than one optimized for compact code.
For the same reason, consider leaving your applications compiled as p-code anyway. Especially for large, UI- and database-intensive applications, the performance gain of compiling to native code won't outweigh the increase in application size. To determine exactly which compilation option is right for you, use the VB Application Performance Explorer (APE) included on your VB CD.