-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 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.1 CE GA2, 7.2.X, 7.3.10 DXP GA1, Master
-
Branch Version/s:7.2.x, 7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
Reproduction:
- Start up the latest master bundle
- Create a new site called "testsite"
- Generate about 10000 assets with many related assets (e.g. blog entries with GenerateRelatedAssets_70x.groovy
)
- 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:
- Create a Widget Page on "testsite"
- Add an Asset Publisher on it
- Go to Asset Publisher's configuration
- In "Asset Selection", set it to Manual, select the blog entry with the title logged by the script: "Title of the first blog entry: ..."
- In "Display Settings", set "Asset Link Behavior" to "View In Context" and check "Set as the Default Asset Publisher for This Page"
- Save the portlet's config
- Add a "Related Assets" portlet on the same page
- 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