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

Poor performance in GroupFragmentEntryLinkDisplayContext._getGroupFragmentEntryUsages

Details

    Description

      Description
      The GroupFragmentEntryLinkDisplayContext._getGroupFragmentEntryUsages method computes a map of groupIds to counts of FragmentEntryLinks with the input fragmentEntryId on those Groups.

      It does this by fetching all the FragmentEntryLinks from the given fragmentEntryId into memory at once. Then it computes the Map via a Streams operation.

      This can be very poor performing if the FragmentEntry is used in a large number of places, since many FragmentEntryLink objects will be fetched into memory at once, and each FragmentEntryLink object itself can potentially be quite large as it has multiple CLOB fields.

      Instead, we should only query the groupId and the count when we compute this Map. This will prevent us from having to fetch a lot of FragmentEntryLink objects into memory at once, and prevent us from having to read a bunch of CLOB fields that we don't need to use.

      Attachments

        Activity

          People

            oziel.souza Oziel Souza
            michael.bowerman Michael Bowerman
            Kiyoshi Lee Kiyoshi Lee
            Michael Bowerman Michael Bowerman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13 weeks, 3 days ago

              Packages

                Version Package
                7.3.X
                7.4.3.33 CE GA33
                Master