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

Related Assets portlet uses SQL queries only, which takes significant amount of time to load

    Details

      Description

      Reproduction:

      1. Start up the latest master bundle
      2. Create a new site called "testsite"
      3. Generate about 10000 assets with many related assets (e.g. blog entries with GenerateRelatedAssets_70x.groovy )
      4. Execute the following Groovy script with the LinkedAssetEntryId replaced (generator script will log it out as "Asset entry ID of the first entry"):
        import java.util.List;
        import com.liferay.asset.kernel.model.AssetEntry;
        import com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil;
        import com.liferay.asset.kernel.service.persistence.AssetEntryQuery;
        
        AssetEntryQuery q = new AssetEntryQuery();
        q.setLinkedAssetEntryId(<LinkedAssetEntryId>);
        
        List<AssetEntry> res = AssetEntryLocalServiceUtil.getEntries(q);
        
        System.out.println("q="+q);
        System.out.println("res="+res.size());
        

      Alternatively, you can also set up a page configuration to execute the same query:

      1. Create a Widget Page on "testsite"
      2. Add an Asset Publisher on it
      3. Go to Asset Publisher's configuration
      4. In "Asset Selection", set it to Manual, select the blog entry with the title logged by the script: "Title of the first blog entry: ..."
      5. In "Display Settings", set "Asset Link Behavior" to "View In Context" and check "Set as the Default Asset Publisher for This Page"
      6. Save the portlet's config
      7. Add a "Related Assets" portlet on the same page
      8. Open the one content displayed by the Asset Publisher

      Expected: the query should be "quick" (max. 1 second)
      Actual result: the page takes 6-15 seconds to load

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                28 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP87
                7.0.10.12 DXP SP12
                7.0.X
                7.1.10 DXP FP15
                7.1.X
                7.2.10 DXP FP2
                7.2.10.1 DXP SP1
                7.2.X
                7.2.1 CE GA2
                Master