Details

    • Epic/Theme:
    • Fix Priority:
      5
    • Similar Issues:
      Show 5 results 

      Description

      The code in 'so-portlet/view_invite.jsp' is not optimal when there's a large (5k+) number of users in database.

      I've tried to test and profile a simple scenario:

      1. have at least 5k users in portal database;
      2. go to some Social Office site;
      3. go to members page in this site;
      4. click on button 'Invite members to this site'.

      If you have empty portal caches for users and groups, you can wait up to tens of seconds (30-40 for our case of 5k+ users) before the popup is rendered. This is caused by ineffective code in so-portlet -> view_invite.jsp. Based on profiling, most of the time is spent on DB calls. The JSP needs to display all non-members of selected group. Current code:

      1. fetches all users of given company (using UserLocalServiceImpl.search(), which after retrieving all company's userIds fetches the User objects one by one) and
      2. then one by one calls UserLocalServiceUtil.hasGroupUser(layout.getGroupId(), curUser.getUserId()) and if user is not a member, adds him to new list;
      3. then iterates through newly constructed list – through group's non-members – and renders HTML table

      So we could end up with more than 10k DB queries for a single JSP rendering (for the first pop-up displaying, then the query results are cached for 10 minutes).

      We should change the JSP code to use more suitable service calls in a such way that the time needed to render the popup is reasonable even for large users' databases.

        Issue Links

          Activity

          Show
          Brian Chan added a comment - https://github.com/brianchandotcom/liferay-plugins/pull/933
          Hide
          mandy.zia added a comment -

          After conversation with Vicki, changing this from Feature Request to Bug. It has been deemed to be a performance bug.

          Show
          mandy.zia added a comment - After conversation with Vicki, changing this from Feature Request to Bug. It has been deemed to be a performance bug.
          Hide
          mandy.zia added a comment - - edited

          PASSED Manual Testing using the steps (#1-4) in the description.

          Fixed on:
          Tomcat 7 + MySQL 5. Portal 6.1.20
          Tomcat 7 + MySQL 5. Portal 6.1.30
          Plugins ee-6.1.x Git ID: e4479bebb481ee96bdc6d2573edd50593c5f1579.

          Show
          mandy.zia added a comment - - edited PASSED Manual Testing using the steps (#1-4) in the description. Fixed on: Tomcat 7 + MySQL 5. Portal 6.1.20 Tomcat 7 + MySQL 5. Portal 6.1.30 Plugins ee-6.1.x Git ID: e4479bebb481ee96bdc6d2573edd50593c5f1579.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response:
                Days since last comment:
                1 year, 24 weeks, 1 day ago

                Development

                  Structure Helper Panel