Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Testing and Tuning EPL monitors | Best practices for writing EPL
Best practices for writing EPL
Wildcard fields that are not relevant
Avoiding unnecessary allocations
Implementing states
EPL is a programming language with some special features. As such, it shares the characteristic with every other programming language that it is possible to write poor, inefficient code. All the techniques that apply to other languages to minimize wasted cycles can also be applied to EPL.
Basic programming optimization techniques all apply:
*Move code out of tight loops
*Avoid unnecessary allocation, for example, strings
*Put common tests first in if ... else form
There is no substitute for empirical evaluation of the performance of your application. You must measure performance and compare measurements when modifications are made. Also, ensure that you are comparing like-with-like. Understanding performance implications is invaluable and it helps in avoiding unnecessary performance costs.
You should know how fast your application needs to be.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.