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

Add calendar event page loading performance issue

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.X EE, 7.0.0 M4
    • Fix Version/s: 7.0.0 M4
    • Component/s: Calendar
    • Labels:

      Description

      The "Add Event" window from calendar portlet is unbearably slow when there are many users, organizations and roles available, specially for non-admin users.

      So far the lines below appear to be responsible for that:

      At about line 129 in edit_calendar_booking.jsp file,

      List<Calendar> manageableCalendars = CalendarServiceUtil.search(themeDisplay.getCompanyId(), null, null, null, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, new CalendarNameComparator(true), ActionKeys.MANAGE_BOOKINGS);

      At about line 650 in edit_calendar_booking.jsp file,

      <%= CalendarUtil.toCalendarsJSONArray(themeDisplay, manageableCalendars) %>,

      The following SQL will be executed repeatedly due to the previous code:

      ( SELECT DISTINCT Group_.groupId AS groupId, REPLACE(Group_.name, ' LFR_ORGANIZATION', '') AS groupName,Group_.type_ AS groupType,Group_.friendlyURL AS groupFriendlyURLFROM Group_INNER JOIN Users_GroupsON (Users_Groups.groupId = Group_.groupId)WHERE (Group_.liveGroupId = 0) AND (Users_Groups.userId = ?) AND (Group_.companyId = ?) AND (Group_.parentGroupId != ?) AND (Group_.liveGroupId = 0) AND (Group_.name != 'Control Panel')AND (Group_.name LIKE ? OR ? IS NULL) AND (Group_.description LIKE ? OR ? IS NULL)AND (Group_.type_ != 4) )
      UNION ( SELECT DISTINCT Group_.groupId AS groupId,REPLACE(Group_.name, ' LFR_ORGANIZATION', '') AS groupName,Group_.type_ AS groupType,Group_.friendlyURL AS groupFriendlyURLFROM Group_ INNER JOIN Users_Orgs ON (Users_Orgs.organizationId = Group_.classPK)WHERE (Users_Orgs.userId = ?)AND (Group_.companyId = ?) AND (Group_.parentGroupId != ?) AND (Group_.liveGroupId = 0)AND (Group_.name != 'Control Panel') AND (Group_.name LIKE ? OR ? IS NULL) AND (Group_.description LIKE ? OR ? IS NULL) AND (Group_.type_ != 4) )
      UNION ( SELECT DISTINCT Group_.groupId AS groupId,REPLACE(Group_.name, ' LFR_ORGANIZATION', '') AS groupName,Group_.type_ AS groupType,Group_.friendlyURL AS groupFriendlyURLFROMGroup_ INNER JOINGroups_OrgsON (Groups_Orgs.groupId = Group_.groupId)INNER JOIN Users_OrgsON (Users_Orgs.organizationId = Groups_Orgs.organizationId)WHERE (Group_.liveGroupId = 0) AND (Users_Orgs.userId = ?)AND (Group_.companyId = ?)AND (Group_.parentGroupId != ?)AND (Group_.liveGroupId = 0) AND (Group_.name != 'Control Panel')AND (Group_.name LIKE ? OR ? IS NULL)AND (Group_.description LIKE ? OR ? IS NULL) AND (Group_.type_ != 4) ) UNION ( SELECT DISTINCT Group_.groupId AS groupId,REPLACE(Group_.name, ' LFR_ORGANIZATION', '') AS groupName,Group_.type_ AS groupType,Group_.friendlyURL AS groupFriendlyURLFROM Group_ INNER JOINGroups_UserGroups ON (Groups_UserGroups.groupId = Group_.groupId)INNER JOIN Users_UserGroups ON (Users_UserGroups.userGroupId = Groups_UserGroups.userGroupId)WHERE (Group_.liveGroupId = 0) AND (Users_UserGroups.userId = ?) AND (Group_.companyId= ?) AND (Group_.parentGroupId != ?) AND (Group_.liveGroupId = 0) AND (Group_.name != 'Control Panel')AND (Group_.name LIKE ? OR ? IS NULL) AND (Group_.description LIKE ? OR ? IS NULL) AND (Group_.type_ != 4) )
      ORDER BY groupName ASC

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mark.jin Mark Jin (Inactive)
                Reporter:
                adam.brandizzi Adam Brandizzi
                Participants of an Issue:
                Recent user:
                Brian Wulbern
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 25 weeks ago

                  Packages

                  Version Package
                  7.0.0 M4