HOW TO: Improving performance in instrumented applications



How can code size and speed be optimized while still getting as much benefit as possible out of the FailSafe engine?


FailSafe comes with two engines, one for applications and one for controls.  The first one is based around the FailSafe.bas module, while the second is based around FSLite.bas.

The first step in optimizing your usage of FailSafe is to choose the correct engine.  In most cases, you should be using the FailSafe.bas engine.  It provides a large amount of control over its operation as well as an error form to display to the user.  For controls, use the FSLite.bas engine, which is much smaller and faster, but does not provide an error form or as much custimization.

Each engine has a set of templates which emphasize different features of the engine.  For example, TRACE.tpl is focused solely on the tracing capabilites, but does not include error handling code.  Choose the template that best suits your needs.  For debugging or betas, you might use MAXIMUM.tpl.  This allows full control over the operation of the engine, while handling errors and tracing function calls.  For a release, however, you might only want to handle errors, and not have the tracing capabilities and overhead.  In that case, instrument with the ERROR.tpl.  Or use STANDARD.tpl for both tracing and error handling with less overhead than MAXIMUM.tpl.  Similar options exist with the FSLite engine's templates. It is also possible to create your own temples that work according to your projects needs.

Old KB# 12131
Comment List
Related Discussions