Details

      Description

      Phenomenon #1: See the reproduction steps on the parent issue (LPS-39987).

      Phenomenon #2

      1) On the Control Panel go to Sites, choose the built-in site (Liferay)
      2) From Actions select Site Administration
      3) On the Public Pages tab choose Export
      4) Under section Permissions tick Permissions in order to export associated rights as well
      5) Click Export

      Notice that the process takes some seconds (2-5sec), because the system checkes all the roles, even those ones which could never have been associated with that site.

      Measurements

      Before the fix

      1) PortletDataContextImpl.doAddPermissions()

      11:46:24,994 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 5527 ms
      11:46:25,302 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 98 ms
      11:46:26,453 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 63 ms
      11:46:26,907 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 50 ms
      11:46:27,284 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 24 ms
      11:46:27,718 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 48 ms
      11:46:28,010 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 49 ms
      11:46:28,393 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 25 ms
      11:46:28,770 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 55 ms
      11:46:29,129 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 47 ms
      11:46:29,538 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 49 ms
      11:46:30,040 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 48 ms
      11:46:30,511 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 47 ms
      11:46:30,800 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 24 ms
      11:46:31,302 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 49 ms
      

      2) SitesImpl.doCopyPortletPermissions()

      Takes several minutes, I waited for ~10 minutes, after that I shut the portal down.

      After the fix

      1) PortletDataContextImpl.doAddPermissions()

      11:26:05,904 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 114 ms
      11:26:05,987 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 2 ms
      11:26:06,217 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 4 ms
      11:26:06,272 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 1 ms
      11:26:06,316 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 0 ms
      11:26:06,357 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 2 ms
      11:26:06,389 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 1 ms
      11:26:06,413 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 0 ms
      11:26:06,447 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 1 ms
      11:26:06,475 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 1 ms
      11:26:06,529 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 2 ms
      11:26:06,562 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 1 ms
      11:26:06,603 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 2 ms
      11:26:06,628 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 0 ms
      11:26:06,739 DEBUG [liferay/background_task-1][PortletDataContextImpl:72] doAddPermissions() takes 2 ms
      

      2) SitesImpl.doCopyPortletPermissions()

      09:18:08,612 DEBUG [http-bio-9080-exec-5][SitesImpl:72] doCopyPortletPermissions() took 30 ms
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shitian.zhang Shitian "Shelton" Zhang (Inactive)
                Reporter:
                laszlo.csontos Laszlo Csontos (Inactive)
                Recent user:
                Steven Smith (Inactive)
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.0 CE RC2