Greetings! I believe this is the appropriate place to report a performance-related issue we've encountered while using the block_opencast plugin. The problem we've identified involves the plugin's attempt to retrieve all events of a series simultaneously by utilizing the /api/events endpoint with the "is_part_of" filter.
This API request takes more than a minute to return a response, leading to a suboptimal user experience and causing timeouts within Moodle, as well as on our network equipment.
Findings:
Upon investigation, we discovered that setting the "withmetadata" parameter to false significantly reduces the request duration to under 200ms. Further analysis revealed that the /api/events/[eventid]/metadata endpoint in Opencast takes an excessively long time to respond (over 700ms for a single event), and the time required for retrieving the event list seems to be directly correlated with the number of events in a specific series.
Proposed Solutions:
I'm uncertain about the most appropriate solution for this issue, but I believe one of the following approaches may be effective:
Disabling "withmetadata": One potential solution could be to disable the "withmetadata" parameter and operate without it. This should significantly improve performance.
Request Limitation and Splitting: Another option might involve limiting and splitting the requests for event retrieval, potentially by grouping events or utilizing pagination to reduce the load on the Opencast server.
If you have any alternative suggestions for addressing the root cause of this performance issue or if additional information is required, please let us know.
Greetings! I believe this is the appropriate place to report a performance-related issue we've encountered while using the block_opencast plugin. The problem we've identified involves the plugin's attempt to retrieve all events of a series simultaneously by utilizing the /api/events endpoint with the "is_part_of" filter.
Example Request (Inefficient):
https://tube.tugraz.at/api/events?filter=is_part_of%3Ae6e66e9a-c5ec-4b6e-a781-014fb86ad7d9&sort=start_date%3ADESC&sign=true&withacl=true&withmetadata=true&withpublications=true
This API request takes more than a minute to return a response, leading to a suboptimal user experience and causing timeouts within Moodle, as well as on our network equipment.
Findings: Upon investigation, we discovered that setting the "withmetadata" parameter to false significantly reduces the request duration to under 200ms. Further analysis revealed that the /api/events/[eventid]/metadata endpoint in Opencast takes an excessively long time to respond (over 700ms for a single event), and the time required for retrieving the event list seems to be directly correlated with the number of events in a specific series.
Proposed Solutions: I'm uncertain about the most appropriate solution for this issue, but I believe one of the following approaches may be effective:
If you have any alternative suggestions for addressing the root cause of this performance issue or if additional information is required, please let us know.
Thanks & best regards, Tobias (TU Graz)