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

Lazy calling PortletRequestUtil.toXML() when preparing template context

    Details

    • Branch Version/s:
      5.2.x, 5.1.x
    • Backported to Branch:
      Committed

      Description

      PortletRequestUtil.toXML() is a heavy method, we call it to get a xml format portlet request when preparing template context.

      So the problem here is we may even do not use this xml data at all, but we prepare it all the time. This is a huge waste.

      This improvement makes the call to PortletRequestUtil.toXML() working in a lazy manner. So if the template processing does not need the xml data, we won't call this method.

      Benchmark result(login test) shows this saves us about 10% garbage generation which gives us about 4% general performance improvement.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              shuyang.zhou Shuyang Zhou
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                12 years, 14 weeks, 1 day ago

                  Packages

                  Version Package
                  6.0.1 RC