Affects Version/s: 7.0.X, Master
When attempting to add a related asset to an asset, if there is a large amount of child sites, the portal will take a very long time to retrieve the list of related assets. This issue has been sped-up in other locations, however this fix relates directly to the traversal of possible child-sites. The cause of this performance hit is in AssetBrowserDisplayContext.getManagementBarFilterItem(), where we fetch each child site's group one at a time. The resolution will be to retrieve all groups at once.
Steps to reproduce:
- Create a new site called "Parent site".
- Create 5000 child sites to the parent site. You can use the attached script to complete this step (make sure to fill out the variables for userId and parentGroupId).
- Within "Parent site", create a web content "Content A"
- Create another content "Content B" and attempt to add a related asset to it.
Expected Results: Content A appears in the related assets list
Actual Results: The related assets list takes a very long time to load (if at all).
Reproduced in Master: 3a7404926f1196b77010467df0174365a1c0f208