Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-37257

Scores page load times excessive for large sites with assessments released to groups.



    • Type: (Deprecated) Contributed Patch
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0, 2.7.0, 2.8.0
    • Fix Version/s: 10.0
    • Labels:
    • Previous Issue Keys:
      SAK-21400, SAM-1472


      We had a site where there were over 200 students and several site groups. Assessments were being released to those groups. We saw load times as much as 5 minutes to access the Total Scores page, but if the assessment was NOT released to a group, the Total Scores page loaded in a few seconds.

      The reason was that there was an inefficiency in how the code decided which users were supposed to be in the list for assessments released to groups. For each of the 200+ students, it had to do some DB checks to see if that student was a member of the group(s) the assessment was released to. That's 200+ individual queries where it could be done in one.

      I created a new method which returns the list of members who should be in a supplied list of site groups. This only requires a single query, and in our case it dramatically decreased the load time. I had to create a new method in the kernel for this.

      See attached patch.

      NOTE: do not use the original "sam-groupLoad01.patch" patch as there are issues with it (see the comments below for details)

        Gliffy Diagrams



            1. large_site_with_group.png
              129 kB
              Ying Wang
            2. sam_1472_iu_patch.txt
              5 kB
              Ying Wang
            3. sam_1472_iu_patch.txt
              5 kB
              Ying Wang
            4. sam_SAK-21400.patch.txt
              2 kB
              Aaron Zeckoski
            5. sam_SAK-21400.patch.txt
              6 kB
              Aaron Zeckoski
            6. sam-groupLoad01.patch
              18 kB
              Paul Dagnall

              Issue Links



                  samigoteam SAMIGO TEAM (Inactive)
                  dagnalpb Paul Dagnall
                  0 Vote for this issue
                  13 Start watching this issue



                      Git Integration