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

Statistics for number of folders, and number of documents counted ineffective in select_document_library.jsp

    Details

      Description

      1. Use the MySQL DB dump on https://drive.google.com/a/liferay.com/file/d/0Bw8n1loL1fHjMzlOR0g4UXpBWms/view?usp=sharing
      It is a DB put together with the aid of the Data Manipulator plugin in order to emulate an environment with a lot of DL folders and files.
      2. Create a web content structure with a documents and media field.
      3. Create a simple template to associate with the structure.
      3. Create a web content, selecting the structure.
      4. Browse the document and media by clicking on the Select button.
      Result: The pop-up window opens, but it takes from 10 to 15 seconds for the first 20 pages to load.
      Expected: it should load much much faster

       // Statistics
      
      List<Long> subfolderIds = DLAppServiceUtil.getSubfolderIds(curFolder.getRepositoryId(), curFolder.getFolderId(), false);
      
      int foldersCount = subfolderIds.size();
      
      subfolderIds.clear();
      subfolderIds.add(curFolder.getFolderId());
      
      int fileEntriesCount = DLAppServiceUtil.getFoldersFileEntriesCount(curFolder.getRepositoryId(), subfolderIds, WorkflowConstants.STATUS_APPROVED);
      
      row.addText(String.valueOf(foldersCount), rowURL);
      row.addText(String.valueOf(fileEntriesCount), rowURL);
      
      

      The DLAppServiceUtil.getFoldersFileEntriesCount can take quite long depending on the files contained in the counted folders

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              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:
                6 years, 34 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE