Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3052

Don't prefetch mod_glossary_get_entry_by_id

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.7.0
    • Fix Version/s: 3.7.1
    • Component/s: Glossary add-on
    • Labels:
    • Testing Instructions:
      Hide

      This issue should only be tested in 1 device. You should be able to inspect the device.

      1. Install the app in the device and login in master site.
      2. Go to MM Dev Testing > Glossary and enable download options.
      3. Open the inspector and go to the Network tab.
      4. Prefetch the glossary "Main glossary in the course". Check that there is no request to the WS mod_glossary_get_entry_by_id.
      5. Go offline and open the glossary. Check that you're able to view the glossary in offline.
      6. Go back to the Glossary section and click any of the links in the section description. Check that the glossary term is opened in offline.
      Show
      This issue should only be tested in 1 device. You should be able to inspect the device. Install the app in the device and login in master site. Go to MM Dev Testing > Glossary and enable download options. Open the inspector and go to the Network tab. Prefetch the glossary "Main glossary in the course". Check that there is no request to the WS mod_glossary_get_entry_by_id. Go offline and open the glossary. Check that you're able to view the glossary in offline. Go back to the Glossary section and click any of the links in the section description. Check that the glossary term is opened in offline.
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Sprint:
      Moodle App 3.7.1

      Description

      When prefetching a glossary, right now we prefetch all entries. In one of our test glossaries, this means we have around 1400 WS calls to get this data.

      The entry data is already included in the get_entries_by_letter WS, so we could use that WS as a fallback to get the entry data if the by_id request isn't cached. That way we wouldn't have to prefetch all the entries individually.

      There is an extra problem though. To use this fallback we need the glossary ID, and we don't have that in glossary auto-links. The only way to solve this is to have a local table with glossaryId + entryId so we can retrieve the glossaryId using an entryId in offline.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dpalou Dani Palou
                Reporter:
                dpalou Dani Palou
                Peer reviewer:
                Pau Ferrer
                Integrator:
                Juan Leyva
                Tester:
                Pau Ferrer
                Participants:
                Component watchers:
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  30/Aug/19