Question
Question on optimizing strategies whitelist functions in Customer Decision Hub
Hi,
We are planning to optimize the Strategies we have built already in PEGA8 version. We are planning to optimize the non-optimized components in an existing strategies to improve the performance of the Decisioning application (few components which can't be refactored). We have gone through the article Optimizing Strategies with Whitelist function.
My question is, what does pega do internally when we add a function to the whitelist functions list to mark Strategy components optimized & how does it improve the Strategy performance? Has anyone tried with the similar changes ?
hi Nanjundan,
Hope you are doing good.
I tried to provide some details regarding Function whitelisting in strategy optimization.
Ever since the release of Pega 8.1, the decision strategy rule runs on a new execution engine that aims to perform better by executing the strategy logic in a more optimized way. The underly technology for performing these optimizations is a well-known technique called Static Single Assignments or SSA.
The 8.1 release has come with 200 white-listed function out of the box. This list is available in a data transform rule called pxWhitelistFunction under the Pega-DecisionEngine ruleset. This can be extended by adding more functions to a data transform called pyWhitelistFunction to any effective application ruleset. The pxWhitelistFunction can be consulted to see how this data transform should be populated.
The SSA engine treats function applications as “pure”, meaning they are assumed not to have any side effect. For instance, if there is a function called multiply(int x, int y)which multiplies two integers x and y and returns the result as the function’s value, then it’s considered pure if that’s all the function does and no matter how many times this function is called on a given set of arguments, say x=5 and y=6, the effect is always the same. If the implementation of multiply did something else that counted as side-effect, e.g. stored something in a database, then this function could not be whitelisted. Lack of side effect is a necessary condition for correct optimizations as the SSA engine avoids redoing computations that have already been performed.
To add a new white list function, it is the strategy designer's responsponsibility to ensure that:
Please let me know if this helps.
Warm Regards,
Venkat