[Building Sakai] Samigo performance grading an assessment

Miguel Carro Pellicer miguel at educlever.es
Mon Jun 30 01:28:22 PDT 2014


Hi Subscribers, i want to share some experiences with the Samigo grading 
process and its performance.

One of my clients detected some performance issues while grading an 
assessment "Released to groups". I made an export of the production 
database to study the problem in depth and i got this conclusions:

Execution conditions:

  * Site with over 280 users (We have sites with 7K users, so i selected
    that site to do not die in the process)
  * Site with 30+ groups.
  * Assessment released to 1 group, 10 people max inside the group
  * Only 1 submission

Execution time:
-------------Start Executing TotalScoreBean->getUserIdMap
---TotalScoreBean->getUserIdMap getEnrollmentListForSelectedSections 
Total: 6.107273677 secs / Size of the list-->1
---TotalScoreBean->getUserIdMap Put list elements inside the Map Total: 
3.69807E-4 secs
-------------End execution of TotalScoreBean->getUserIdMap Total: 
6.107788306 secs

That method spent 6.10 seconds to return the map of users, that's too 
much,  i reviewed the implementation of 
SectionAwareServiceHelperImpl.java -> getGroupReleaseEnrollments.

  * The method iterates over all users in the site
  * For every user checks if the user belongs to the configured groups.
      o Iterates over all site groups where the user is member
      o Compares if the groups where the user is member is configured in
        the assessment.

The final time for this case is 6,10 seconds, we have sites that spents 
almost 40 seconds in render TotalScores screen.

So....i decided to make a new implementation

  * Gets the configured groups
  * For every configured group, get the enrolled users.

.....and i got this times:

-------------Start Executing TotalScoreBean->getUserIdMap
---TotalScoreBean->getUserIdMap getEnrollmentListForSelectedSections 
Total: 0.312536644 secs / Size of the list-->1
---TotalScoreBean->getUserIdMap Put list elements inside the Map Total: 
3.33822E-4 secs
-------------End execution of TotalScoreBean->getUserIdMap Total: 
0.31294946 secs

The new implementation is this 
(samigo-services\src\java\org\sakaiproject\tool\assessment\integration\helper\integrated\SectionAwareServiceHelperImpl.java):

/**
      * added by MCARRO - June 2014
      * @param siteid
      * @param userUid
      * @return
      */
     public List getGroupReleaseEnrollments(String siteid, String 
userUid, String publishedAssessmentId) {
         List enrollments = new ArrayList<EnrollmentRecord>();
         List releaseGroupIds = PersistenceService.getInstance()
           .getPublishedAssessmentFacadeQueries()
.getReleaseToGroupIdsForPublishedAssessment(publishedAssessmentId);
         Iterator groupsIter = releaseGroupIds.iterator();
         while (groupsIter.hasNext()) {
             String groupId = (String) groupsIter.next();
enrollments.addAll(getSectionAwareness().getSectionMembersInRole(groupId, Role.STUDENT)); 

         }
         return enrollments;
     }

Someone consider interesting changing the current implementation? 
Someone see any problem with this new implementation? I checked lots of 
assessments and the information is the same, but the processing time 
decreased drastically.

Thank you so much, Miguel.

-- 
Miguel Carro Pellicer
Logo 	

Miguel Carro 
Pellicer<http://es.linkedin.com/pub/miguel-carro-pellicer/38/502/b92>
/IT Consultant - Elearning solutions/

Phone: +34 - 686266485
Email: miguel at educlever.es <mailto:miguel at educlever.es>

No me imprimas si no es necesario. Protejamos el medio ambiente


AVISO LEGAL: El contenido de este mensaje de correo electrónico, 
incluidos los ficheros adjuntos, es confidencial y está protegido por el 
artículo 18.3 de la Constitución Española, que garantiza el secreto de 
las comunicaciones.
Si usted recibe este mensaje por error, por favor póngase en contacto 
con el remitente para informarle de este hecho, y no difunda su 
contenido ni haga copias.
*** Este mensaje ha sido verificado con herramientas de eliminación de 
virus y contenido malicioso ***
Este aviso legal ha sido incorporado automáticamente al mensaje.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140630/6ccb417f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 17251 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140630/6ccb417f/attachment.jpe 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1103 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140630/6ccb417f/attachment-0001.jpe 


More information about the sakai-dev mailing list