Gradebook running slow and freezing

Gradebook running slow and freezing

by Nicole Pinto -
Number of replies: 4
Our University just installed a new instance of Moodle 3.2.3+ (build 20170622) with the Boost theme. We currently have a course that is using the meta course enrollment method to enroll users from 5 other courses. This is a total of over 100 users for the course. 

When the faculty member clicks on the gradebook it's somewhat slow to load, unless editing is on and then the performance is markedly worse. In Chrome and Safari, it's essentially unusable, often leaving Chrome unresponsive. Using the browers' development tools, we've determined that a significant amount of time (90% or more - more than 98% with Chrome) is being spent in page render operations, not downloading data / scripting, and the render behavior seems to occur in phrases (perhaps as each member course's students are added to the list). A standalone (non-meta) class with a similar number of students doesn't have the same issue.

With some testing we have discovered that the performance is noticeably improved when using a non-webkit browser such as Firefox or Microsoft Edge, or by changing the Boost theme to the Clean theme. Even though using Firefox has made the gradebook usable the performace is still not ideal and not all faculty use Firefox for browsing. 

We've largely ruled-out a server-side performance issue due to the differences between browsers - on the same client computer, Edge can display the edit screen for the course gradebook in under 20 seconds, while Chrome took over 300. The data seems to be coming back from the server fairly quickly. We're not seeing any load on either the front-end moodle server or on the database server. We're almost left wondering if, for each course being included, there's an additional render and re-render of the courses already queried as the list is being built. 

Has anyone ran into the same problem? We are looking for any suggestions of improvement. 
Average of ratings: Useful (1)
In reply to Nicole Pinto

Re: Gradebook running slow and freezing

by Steve Bader -

Hi Nicole,

We have experienced and discovered a lot of the same things.

We are currently on Moodle version 3.2.4 and use a custom theme that has Boost as it's parent. Very recently we've started receiving reports about extremely slow response times in the grade book when in edit mode.

We've discovered that the problem relates to the combination of webkit browsers (Chrome/Safari) and the Boost theme (even with a vanilla install of Moodle). We've tested with older versions of Chrome (v55) and discovered that the issue does not exist. As you discovered, the problem seems to exist on the client side of the application.

Digging into the performance tab in Chrome's developer tool, you'll see the continuous running of "Update Layer Tree" which is Chrome performing some type of rendering. From what I've gathered, it looks like there are some extra event listeners that trigger this behavior but I have not been able to track down where they are added yet.

Currently our response to faculty and staff is to use Firefox while we work on a fix.




Average of ratings: Useful (1)
In reply to Nicole Pinto

Re: Gradebook running slow and freezing

by Steve Bader -

Hi Nicole and others...

We have identified the issue that's causing the delays. Applying the touch-action style to several elements seems to cause Chrome some issues. In the Boost theme, Bootstrap version 4-alpha is being used. In the _reboot.scss file (line 263), touch-action: manipulation is being applied to several elements to prevent the click delay that some browsers don't remove when using meta content="width=device-width".

If you reset the touch-action on these elements (to "auto") within the grade book, the delay is gone.  I believe it's Chrome that is ultimately misbehaving but I don't believe it will be corrected anytime soon.

Attached is the fix we are deploying to resolve the issue in the grade book. I will be making a tracker issue soon.

Hope this helps!

Average of ratings: Useful (2)
In reply to Steve Bader

Re: Gradebook running slow and freezing

by Nicole Pinto -

Thank you so much for your reply. 


Can you tell me if you have a link to a modified styles.css?