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

Getting all folderids when searching is very inefficient in select_document_library.jsp

    Details

      Description

      The time consuming calls come from select_document_library.jsp:

      if (folderId > 0) {
      	folderIdsArray = new long[] {folderId};
      
      	folder = DLAppServiceUtil.getFolder(folderId);
      }
      else {
      	long defaultFolderId = DLFolderConstants.getFolderId(groupId, DLFolderConstants.getDataRepositoryId(groupId, searchFolderIds));
      
      	List<Long> folderIds = DLAppServiceUtil.getSubfolderIds(groupId, searchFolderIds);
      
      	folderIds.add(0, defaultFolderId);
      
      	folderIdsArray = StringUtil.split(StringUtil.merge(folderIds), 0L);
      }
      

      The culprit is the DLAppServiceUtil.getSubfolderIds method, it takes a lot of time.

      Identical code was changed in LPS-41870 but only in document_library/search_resources.jsp Commit

      On master this code has been removed Commit

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yvonne.han Yvonne Han
              Reporter:
              zsolt.olah Zsolt Oláh (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 33 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE