Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-27569 Forums performance issues in large classes
  3. SAK-29654

Performance issue with user ranking in Forums



    • Type: Sub-task
    • Status: Verified
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.4
    • Fix Version/s: 10.7, 11.0, 12.0
    • Component/s: Forums Tool
    • Labels:
    • 11 status:


      There seems to be a significant performance bottleneck in Forums with large numbers of posts and users. This appears to be due at least in part to the ranking of each user every time a new action is taken. In our (NYU’s) instance this query turned out to be our #1 DB time consuming query:

      select count (*) as col_0_0_ from MFR_MESSAGE_T messageimp0_ inner join MFR_TOPIC_T topicimpl1_ on messageimp0_.surrogateKey=topicimpl1_.ID inner join MFR_OPEN_FORUM_T openforumi2_ on topicimpl1_.of_surrogateKey=openforumi2_.ID inner join MFR_AREA_T areaimpl3_ on openforumi2_.surrogateKey=areaimpl3_.ID where areaimpl3_.CONTEXT_ID=:1 and messageimp0_.DRAFT=0 and messageimp0_.DELETED=0 and messageimp0_.CREATED_BY=:2

      The code looks to the correct indexes, and we measured that the query is taking about 10 milliseconds to complete (maybe more like 30 milliseconds once you factor in network latency). However, because this query runs once for each user, this time adds up significantly in sites with many users and a large number of Topics/posts.

      Performance could be improved by adding an option that allows the admin to turn off ranking to or otherwise change the code to calculate user ranks in bulk.

      Link to image of all page requests in Firebug: https://drive.google.com/file/d/0B_Eit0JDnaT1dk03bEFMdXkxQ2s/view?usp=sharing

        Gliffy Diagrams



              Issue Links



                  • Assignee:
                    maintenanceteam Core Team
                    kyle.blythe Kyle Blythe
                  • Votes:
                    2 Vote for this issue
                    11 Start watching this issue


                    • Created:

                      Git Integration