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

Auto-bulk Ajax requests into a single request when possible

XMLWordPrintable

    • MOODLE_32_STABLE
    • MDL-57543-master
    • Hide

      Behat

      1. Confirm that the whole suite passes

      Regression test

      1. Confirm that the new assignment grading interface works
      2. Confirm that you can get a token using login/token.php
      3. Confirm that you can upload files using the mobile app
      4. Confirm that you can assert a badge: {{badges/assertion.php}
        • The only way I found to test this was to directly access it: ?b=HASH
      Show
      Behat Confirm that the whole suite passes Regression test Confirm that the new assignment grading interface works Confirm that you can get a token using login/token.php Confirm that you can upload files using the mobile app Confirm that you can assert a badge: {{badges/assertion.php} The only way I found to test this was to directly access it: ?b=HASH

      Since 3.2 landed, I have noticed that each page loads causes 3 Ajax requests to be made. Those are fetching the flash messages (also called notifications) to display, the count of unread notifications, and the count of unread messages.

      Because those are in separate APIs, it's understandable that they are not bulked, however the AMD Ajax layer could take care of this and group them if they occur in a relatively short amount of time between one another.

      In general, manually bulking Ajax requests is difficult because of the separation of concerns a developer would place in their API. For instance, if you had a function to submit an ajax update, and another function to fetch a list of objects to refresh your view, it is unlikely that your code would combine both requests in one.

      In short, we can bulk Ajax requests, but we are not really using this feature very well.

            Unassigned Unassigned
            fred Frédéric Massart
            Damyon Wiese Damyon Wiese
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.