Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      9
    • Similar Issues:
      Show 3 results 

      Description

      Steps to reproduce:
      1) Create 60 blank roles
      2) Create a site template with 14 pages and about 70 portlets overall
      3) Create a new site with this template

      Observed behavior: It took ~20 seconds to create a new site on SSD and about ~30-50 on external HDD.

      Root cause:
      During portlet export permission exporter adds a record for every role in portletDataContext, even if they don't have any actionKeys, and it causes a lot of unnecessary processing at the import.

      Solution:
      Skip roles which doesn't have actionKeys during permission export.

        Issue Links

          Activity

          Hide
          Raymond Auge added a comment -

          had to make additional changes because I broke startup from clean DB.

          https://github.com/brianchandotcom/liferay-portal/pull/11775

          Show
          Raymond Auge added a comment - had to make additional changes because I broke startup from clean DB. https://github.com/brianchandotcom/liferay-portal/pull/11775
          Hide
          Mark Jin added a comment -

          PASSED Manual Testing using the following steps:

          1. 6.1.20 EE GA2 and 6.1.x EE
            1. Import tsb31.sql to new database. You can got it from LPP-6495.
            2. Start portal and sign in.
            3. Go to Control Panel/Sites.
            4. Create new site with site template.
          2. 6.2.x
            1. Go to Control Panel/Server Administration/Script.
            2. Run this code with Groovy language.
              import com.liferay.portal.service.ServiceContext;
              import com.liferay.portal.service.RoleServiceUtil;
              
              final ServiceContext serviceContext = new ServiceContext();
              serviceContext.setScopeGroupId(10181);
              serviceContext.setUserId(10198);
              
              int roleCount = 60;
              
              for (int i = 0; i < roleCount; i++) {
               Map<Locale, String> titleMap = new HashMap<Locale, String>();
               titleMap.put(Locale.US, "RoleTitle #" + i);
              
               Map<Locale, String> descriptionMap = new HashMap<Locale, String>();
               descriptionMap.put(Locale.US, "Role description #" + i);
              
               RoleServiceUtil.addRole(
                null, 0, "Role#" + i, titleMap, descriptionMap, 1, null,
                serviceContext);
              }
              
            3. Go to Site Templates.
            4. Create a new site templates with 14 page, Every page contain 6~8 portlet.
            5. Create new site with the site template.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2.

          When create new site from a site template, it takes long time.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 5470253434590c284a20d0298833011d472c1555.
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 40af317d613f8e84a8bb6b886910eeec6d71f671.

          Create site works fine.

          Show
          Mark Jin added a comment - PASSED Manual Testing using the following steps: 6.1.20 EE GA2 and 6.1.x EE Import tsb31.sql to new database. You can got it from LPP-6495. Start portal and sign in. Go to Control Panel/Sites. Create new site with site template. 6.2.x Go to Control Panel/Server Administration/Script. Run this code with Groovy language. import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.RoleServiceUtil; final ServiceContext serviceContext = new ServiceContext(); serviceContext.setScopeGroupId(10181); serviceContext.setUserId(10198); int roleCount = 60; for ( int i = 0; i < roleCount; i++) { Map<Locale, String > titleMap = new HashMap<Locale, String >(); titleMap.put(Locale.US, "RoleTitle #" + i); Map<Locale, String > descriptionMap = new HashMap<Locale, String >(); descriptionMap.put(Locale.US, "Role description #" + i); RoleServiceUtil.addRole( null , 0, "Role#" + i, titleMap, descriptionMap, 1, null , serviceContext); } Go to Site Templates. Create a new site templates with 14 page, Every page contain 6~8 portlet. Create new site with the site template. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2. When create new site from a site template, it takes long time. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 5470253434590c284a20d0298833011d472c1555. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 40af317d613f8e84a8bb6b886910eeec6d71f671. Create site works fine.

            People

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

              Dates

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

                Development

                  Structure Helper Panel