Ideagen Internal Audit (Aura): Performance issues and server locking caused by DocPop's RTFToPlain function
RTFToPlain is a DocPop function for converting rich text field content to plain text.
Use of this function is problematic in two ways:
- We have recently identified a bug in the main application service that can be triggered by this function, and which causes the service to go into an infinite loop. This causes errors and timeouts for all users across the system
- The function causes the service to do a lot of work, and as it is possible to create large reports against numerous RTF fields, when a report is run the performance impact on the service can be significant
Therefore, where performance problems are reported (especially widespread timeouts) and use of reports is suspected as a factor, the following steps should be taken:
Firstly, upgrade the system. The bug that can lock the service is not present in v5.3.0.12 or v5.4.0.4, so the system should be upgraded to one of these versions. This will stop the service from locking completely, although performance may still dip where use is made of the RTFToPlain function
Secondly, update report templates to remove the RTFToPlain function. The purpose of this function is to take the content of a rich text field and strip out the rich text markup, but converting RTF to plain is no longer necessary because recent versions of Pentana have included a buddy field for each RTF field. It is better to report against the buddy field (named _Plain), which is already stripped of markup, because:
- Less data is transferred from the database
- The service has to do less work
For example, instead of using:
Insert(RTFToPlain(GetColumn(“MyDescription)”)) where MyDescription is the ID of Audit.Description in your template query
you would use
Insert(GetColumn(“MyDescription”)) where MyDescription is the ID of Audit.Description_Plain in the template query