Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Performance degrades when parsing connect-REST JSON response

SA-86540

Summary



The Pega application executes database queries multiple times for each Connect-REST call while parsing the JSON Response.

Below is an example of a query which the application executes multiple times,


SELECT pyPropertyName AS "pyPropertyName", pyPageClass AS "pyPageClass", pyPropertyMode AS "pyPropertyMode" FROM PRULEOWN731.pr4_rule_property "property" WHERE (pxObjClass = 'Rule-Obj-Property') AND (pyClassName = :1 ) AND (pyRuleAvailable = 'Yes')

This causes a tremendous load on the database. As a result, performance degrades when parsing the Connect-REST JSON Response


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a Connect-REST Integration using a sample Data model.
  2. Trace the database queries that are executed by the Connect-REST call while parsing the JSON Response.


Root Cause



An issue in the custom application code or rules.

When the legacy JSON mapping (that is, without Fast Processing option or without using JSON data transform) was used, the Pega application executed queries on the PR4_RULE_PROPERTY table for each unique page or pagelist and the database queries were executed per pxObjClass per REST call.



Resolution



Perform either of the following local-changes:
  • Enable the 'Use Fast Processing' option in the Connect-REST Response tab for a method as applicable. This field is displayed when JSON is selected in the 'Map from' field.

    For complex JSON structures, if the Clipboard structure exactly matches the JSON structure, selecting this field improves processing speed. For this option to work, follow the below guidelines when configuring the Data model:
  1. The JSON property names and the Clipboard property names must match.
  2. The JSON tree structure and the Clipboard tree structure must be similar.
  3. The scalar arrays in JSON must be mapped to the Clipboard as page lists.
  4. Multi-dimensional arrays must be mapped into page lists of page lists with the same embedded property names. Map multi-dimensional arrays in to page lists of page lists with the same embedded property names.
     
    Page groups, value groups, and Java objects are not supported.
     
    When using the 'Use Fast Processing' option, the JSON mapping does not work for a property that leverages the pzExternalName property qualifier to map the value to the Clipboard.
  • Use the JSON data tranform as a Response data transform for REST Integration to make serialization and deserialization faster and more efficient.

    For more information, refer to: https://community.pega.com/knowledgebase/configuring-json-data-transform-response-data-transform-data-pages


    When using JSON data transform feature, use the property with the pzExternalName property qualifier (as needed) to map the value to the Clipboard (unlike the 'Use Fast Processing' option).

Published August 16, 2019 - Updated December 2, 2021

Was this useful?

50% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice