Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-138736

Improve performance of DDMFormTemplateContextFactoryHelper.getEvaluableDDMFormFieldNames

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: Master
    • Fix Version/s: 7.4.13 DXP GA1, Master
    • Component/s: Forms
    • Labels:
      None

      Description

      Currently DDMFormTemplateContextFactoryHelper.getEvaluableDDMFormFieldNames has an algorithm that uses runtime compilation of regex pattern (Pattern.compile) to determine which form fields are being used in the form expressions. This method has a considerable cost (to convert a string representation to an internal model) and its use at runtime should be avoided if possible.

      Steps to reproduce

      1. Import Forms-256 fields-with-1-entry-submitted.portlet.lar.
      2. Open the imported form for edition
      3. Save the form

      Expected behavior

      The server takes roughly 5 seconds to respond

      Current behavior

      The server is taking more than 20 seconds to respond

      Additional notes

      The time that the server takes to responde can be see in the Network tab of Chrome DevTools. Use "manage?" to filter the relevant requests (one has method POST and the other with method GETs follow immediately). Then check the Waiting portion (TTFB) of the timing of request (see attached screenshot for a relevant capture).

      The form builder itself will take a little longer to be ready than the time waiting for the server response, as more processing is needed in the front-end to render the form builder.

      This improvement opportunity was discovered while working on LPS-138168, for a customer who authored a form with more than 256 fields.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            cleydyr.albuquerque Cleydyr Albuquerque
            Participants of an Issue:
            Recent user:
            Sophia Zhang
            Engineering Assignee:
            Cleydyr Albuquerque
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 weeks, 3 days ago

                Packages

                Version Package
                7.4.13 DXP GA1
                Master