Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36045

Users enrolled in a large number of courses experience browser unresponsiveness when using IE8 and 9



    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.3.2
    • None
    • Navigation, Performance


      I've been following some of the different JavaScript performance issues including http://tracker.moodle.org/browse/MDL-34328 and couldn't find one specifically for the issue I'm having.

      When users are enrolled in lots of courses some JavaScript that works on the My Courses section of the navigation block takes an awful long time to do what it needs to do and causes the browser to become unresponsive. Eventually the "Stop running this script" message box appears. I've seen this behaviour in both IE8 and IE9.

      I've done some rudimentary profiling of the code in blocks/navigation/yui/navigation/navigation.js and found that TREE.initializer seems to be causing the slow down, specifically this for loop:

      // Establish each expandable branch as a tree branch.
      for (var i in expansions) {
          new BRANCH({
              overrides : { 
              expandable : true,
                  children : [], 
                  haschildren : true

      I have a user enrolled in about 950 courses where this section of JavaScript code running on IE8 on a reasonably powerful machine can take 38 seconds to run. Even for a user enrolled in a more sensible number of courses like 25, this section of code can take almost a whole second to run which would be starting to have a noticeable impact on the user experience. Obviously the navigation block appears in lots of places throughout Moodle so as a result the slow down can have a big impact on a user's overall Moodle experience.

      I've also seen a similar level of unresponsiveness experienced by users viewing the profile of another user that is enrolled in a large number of courses, probably for a similar reason.


        Issue Links



              Unassigned Unassigned
              nmares Nathan Mares
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              0 Vote for this issue
              6 Start watching this issue