When looking to improve the performance of your code, you may want to examine your use of the ColdFusion Evaluate function. The ColdFusion Evaluate function is often used to resolve dynamically named variables, such as form variables. This function forces ColdFusion to compile every time you call the expression, which results in increased process time and memory usage within a shared ColdFusion environment. Since deploying our self-healing solution within the shared environment, we've noticed quite a few websites that could benefit from avoiding the Evaluate function whenever possible.
While most instances of the Evaluate function look similar to:
| <cfset value=evaluate("form.field#i#")> |
You can consider writing something such as:
| <cfset value=form["field#i#"]> |
For more information on avoiding the Evaluate function, see the Adobe Livedocs article which can be found at
http://livedocs.macromedia.com