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

Selecting a site from 'My Sites' is very slow when Liferay contains a large number of organisations

    Details

      Description

      Issue
      Getting the list of My Sites is very slow when there are many organizations with no site

      Steps to reproduce
      1. Start a clean 7.1 bundle (dxp-17) connected to an empty MySQL database
      2. Login to Liferay
      3. Reindex
      4. Go to CP > Server Administration > Script
      5. Run the following script to generate 44,000 organizations (with no site)

      import com.liferay.portal.kernel.log.LogFactoryUtil
      import com.liferay.portal.kernel.model.OrganizationConstants
      import com.liferay.portal.kernel.service.CompanyLocalServiceUtil
      import com.liferay.portal.kernel.service.OrganizationLocalServiceUtil
      import com.liferay.portal.kernel.util.PortalUtil
      def log = LogFactoryUtil.getLog("groovy")
      def orgCount = 44000
      def companyId = PortalUtil.getDefaultCompanyId()
      def company = CompanyLocalServiceUtil.getCompany(companyId)
      def defaultUser = company.getDefaultUser()
      def userId = defaultUser.getUserId()
      log.info("Creating " + orgCount + " organisations...")
      for (i=0; i<orgCount; i++) {
      	def parentOrganizationId = OrganizationConstants.DEFAULT_PARENT_ORGANIZATION_ID
      	def name = "Test_organisation " + i
      	def site = false
      	log.info("Creating organisation " + (i+1) + " of " + orgCount)
      	OrganizationLocalServiceUtil.addOrganization(userId, parentOrganizationId, name, site)
      }
      log.info("Created " + orgCount + " organisations");
      

      6. Click on the compass icon "Go to Other Sites" from the product menu
      7. Go to "My Sites" tab
      8. Note it takes about 10 seconds to display 2 sites

      Actual results
      Takes 10 seconds to display 2 sites. The more organizations there are, the more it takes.
      For the customer, it took 20 seconds.

      Expected results
      Page load is fast as there are only 2 sites to display.

      Reproduced in

      • master commit (896f13d991710dbbc49980cd80e3a3df6436c65b)
        21 seconds to load My Sites (44,000 records)
      • 7.1 dxp-17

      Thank you!!

      * Please see Zendesk Support tab for further comments and attachments.

        Attachments

          Activity

            People

            Assignee:
            sharry.shi Sharry Shi
            Reporter:
            hong.vo Hong Vo
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Engineering Assignee:
            Hong Vo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              31 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP95
                7.0.10.15 DXP SP15
                7.0.X
                7.1.10 DXP FP20
                7.1.10.5 SP5
                7.1.X
                7.2.10 DXP FP9
                7.2.X
                7.3.X
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master