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

Backend Functions extremely slow when managing thousands sites and layouts

    Details

    • Fix Priority:
      2

      Description

      When managing BackEnd features like open list of sites for a goto need or opening WCD Template or saving, Liferay is extremely slow if is managing thousands sites and Layouts.

       

      I debugged source code and discovered that when ThemeDisplay is managing a site without private pages (in my specific test but probably is true either in other cases) the list of layouts is empty. This fact implies that a call to list of FriendlyUrl (during my test it happened...) method 

       

      public List<LayoutFriendlyURL> findByP_L(long[] plids, String languageId,
      int start, int end,
      OrderByComparator<LayoutFriendlyURL> orderByComparator,
      boolean retrieveFromCache)

      of

      com.liferay.portal.service.persistence.impl.LayoutFriendlyURLPersistenceImpl.

       

      is called with start and and equals to ALL_POS and array plids empty!

       

      The implementations is not able to manage such a case since it loads ALL 

       

      LayoutFriendlyURL

       

      available in the underlying database

      Actually there is this test

       

      if (plids.length > 0) {
      query.append(StringPool.OPEN_PARENTHESIS);

      query.append(_FINDER_COLUMN_P_L_PLID_7);

      query.append(StringUtil.merge(plids));

      query.append(StringPool.CLOSE_PARENTHESIS);

      query.append(StringPool.CLOSE_PARENTHESIS);

      query.append(WHERE_AND);
      }

      In my dataabse I have more than 50000 entries in that tables so Liferay becomes unusuable!

       

      Right now I patched that method telling that if array is empty the answer must be empty as well and all seems to works perfectly!

       

      Sincerely

       

      Claudio

       

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                1 year, 45 weeks, 4 days ago

                Packages

                Version Package