1
Vote

Performance bottleneck

description

There is a performance bottleneck when running templates that include a conditional loop (SCAN FOR).
For each record, a method is being created on the fly via reflaction to evaluate the condition. It provides a great deal of flexibility but degrades performance.
 
Possible alternatives: Modify the expression evaluation methods so that the values of the expression are passed in as parameters and the expression is compiled just once.
 
Include new functions for most common operators, and pass the parameters in. For example:
 
OR(greaterThan(value1, value2), value3)

comments

gmendez wrote Jun 12, 2012 at 5:19 PM

Some days ago I have decided to go on by modifying the expression evaluation methods. The 1st of the two possible options I was thinking of.

I've created a proof of concept, and got the new methods.

Just need some work to integrate them with NTemplates. Hopefully, the user's will note an enhacement in efficiency without the need of changing their templates or code. I expect to release the new version before the end of june/2012.

wrote Feb 13, 2013 at 7:48 PM