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

hasMessages API call in recalculateAndSave increases CPU usage



The recursive nature of hasMessages API negatively impacts CPU usage, response time and scalability in the application. HFix-22496 is installed which adds logic to bypass some expensive processing into utility function hasMessages. The out-of-the-box final Activity, Work-RecalculateAndSave, step 5, triggers hasmessage processing directly through API.
In unit tests, it is observed that .75 CPU seconds is spent in this single Activity step.

After a private checkout and applying the logic from HFix-22496 into this Activity, time and CPU cost was
reduced by 66% (to .25 seconds).

Error Messages

Not Applicable

Steps to Reproduce

Traces taken during Wrap-Up display high CPU cost.

Root Cause

The root cause of this issue was the explicit call to hasMessages() API taking more time because of auto-populate chaining.


This issue is resolved by HFix-22869 which has changes in Work-RecalculateAndSave Activity disabling auto-populate while calling hasMessages() and restoring the previous value again.

Published July 29, 2015 - Updated October 8, 2020

Was this useful?

0% 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?

Want to help us improve this content?

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
Contact us