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

When a user has many connections and the Microblogs portlet is added to a page, rendering it takes a lot of time

    Details

      Description

      Reproduction steps:

      1. Create 4000 users
      2. Run the below groovy script (change 20156 to the userId of the user with which you are logged in)
        import com.liferay.social.kernel.service.SocialRelationLocalServiceUtil;
        import com.liferay.portal.kernel.service.UserLocalServiceUtil;
        import com.liferay.portal.kernel.dao.orm.QueryUtil;
        
        List users =UserLocalServiceUtil.getUsers(2, 4001);
        for (user in users) {
        long idu = user.getUserId();
        SocialRelationLocalServiceUtil.addRelation(20156, idu, 12);
        }
      3. Add the Microblogs portlet to a page
      4. Refresh the page

      Experienced behavior: In this case the user has 4000 connections and the page is loaded in about 14 seconds

      Expected behavior: Rendering the portlet shouldn't take this much time

      Loading the page takes even more time if the user has more connections.

        Attachments

          Activity

            People

            Assignee:
            hong.zhao Hong Zhao
            Reporter:
            istvan.dezsi Istvan Dezsi
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 8 weeks ago

                Packages

                Version Package
                7.0.0 DXP FP31
                7.0.5 CE GA6
                7.0.X
                7.1.X
                Master