Reduce Processing Overhead – Avoid Adobe ColdFusion Evaluate Function

Asked By 0 points N/A Posted on -

Hi. I have been facing this issue of increased processing overhead from a long time. How can it be reduced? Also, can you give me an alternative to use reference of an array in place of evaluate funtion?

Answered By 0 points N/A #94947

Reduce Processing Overhead – Avoid Adobe ColdFusion Evaluate Function


Hi. If you are using ColdFusion evaluate function in your code, then stop using it because it causes processing overhead. There are some alternatives that can be used instead. To use array reference without evaluate function, there is a more efficient way as follows-


ManufacturedGood Name: #Form [“manufacturedgood_” & i] #


The following is done in the code above-

1) In the code, “manufacturedgood_” is concatenated with the value of i which is a variable in the array index after which the expression is evaluated by ColdFusion.

2) The value of the variable ‘i’ is determined by ColdFusion. [i=1]

3) The value of the variable ‘i’ and the string are concatenated by ColdFusion to get manufacturedgood_1.

4) The result is used by ColdFusion as the key value in the Form structure to get Form[manufacturedgood_1]

This code dynamically creates a structure reference by using string and a variable without the use of dynamic evaluation.

Login/Register to Answer

Related Questions