Enable the UDF feature in JSP Lookup tag for best performance
PRPC 6.3 includes an optional performance enhancement for the <pega:lookup> JSP tag that, when enabled , extracts only the value of a single property from the pzPVStream column (commonly known as the BLOB column). However, by default, this feature is disabled.
Through a simple Dynamic System Setting, you can in most cases enable this feature and benefit from the performance improvement.
Even if your application includes no hand-crafted JSP tags, the lookup tag may be present in generated HTML and in standard rules, so the performance benefit is worth enabling.
The setting also improves the performance of linked property references.
One popular use for the the <pega:lookup ...> JavaServer Pages tag is to retrieve the value of a scalar (Single Value) property that's not present on the clipboard. In PRPC versions before V6.3, and in V6.3 by default, at runtime the <pega:lookup > tag retrieves the BLOB column of the instance that's not on the clipboard from the PegaRULES database, decodes it (creating a temporary clipboard page), and extracts the needed value. (This processing occurs even when the needed value is available more directly as an exposed column. )
Optionally, through a Dynamic System Setting, you can cause the <pega:lookup> JSP tag to execute a database User Defined Function (built into V6.3) to extract and return the property value. If the value exists as a column value, it is returned immediately. If the value exists only inside the BLOB column, it is extracted and returned. The full BLOB unpacking does not occur.
As a best practice, you should use only auto-generated section and controls in your application, thereby avoiding the complexity, possible security risks, and maintenance issues of hand-crafted HTML. As a result, your application RuleSets may not include hand-coded section or HTML rules that explicitly reference the <pega:lookup > tag. However, your application may include <pega:lookup > tags created by PRPC-provided generation, or may incorporate standard rules that are not autogenerated and do include this tag.
In either case, implementing the performance enhancement is straightforward and beneficial.
Note: This feature depends on database User Defined Functions (UDFs)supplied in PRPC 6.3. You can't implement this feature if your installer or DBA has disabled UDF support. UDFs also support reporting on unexposed properties.
Step 1: Create a dynamic system setting
Create a dynamic system setting named prconfig/cache/enableForlookup. As with all dynamic system settings that have prconfig as the first portion, set the Owning RuleSet to Pega-Engine.
Don't confuse the Owning RuleSet value — always Pega-Engine for such settings — with the separate Associated RuleSet field, which can be blank or any value.
Step 2: Set the value to true
Set the Value to true. Save the form.
Step 3: (Optional) Disable caching of retrieved values
By default, values retrieved for this tag — whether from the BLOB column or from an exposed column — are briefly cached at the Thread level on the users' clipboard. The cached values are discarded when the requestor completes any Commit operation.
This caching is designed to improve performance, since a second request for the same property value can be satisfied from the clipboard, requiring no database access. However, in certain situations, such caching may not be desirable. For example, your application may recompute values for this property through a declare expression rule, or may accept a user input value, so that the cached value is stale and potentially incorrect.
To disable such caching, you can include the attribute useCache = false within the lookup tag - but you can do this only in those rules containing handcrafted HTML. To disable such caching always, you can create another Dynamic System Setting prconfig/cache/enableForlookup and set the value to false :
If this Dynamic System Setting is not present, or exists with the value true, caching is enabled.
In a multinode system, you can append /default to the Setting Purpose to indicate that the value is to apply to every node.
Step 4: Stop and restart the server
The dynamic system settings take effect on a node when the node is restarted.