Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to further optimise equella_list_courses_for_user web service call #63

Closed
mrblippy opened this issue Aug 13, 2019 · 2 comments
Closed
Labels
Milestone

Comments

@mrblippy
Copy link
Contributor

An Edalex client's moodle takes around 30 seconds to list courses using the equella_list_courses_for_user web service call (the code lives inside externallib.php)

There was an effort performed in the past to optimise this 32acf74#diff-f232daf9e853b92201e86b2262bc9aca
Part of that fix involved caching the course results. So perhaps that's no longer working?

@jonof
Copy link
Contributor

jonof commented Aug 13, 2019

If the user is an admin or similarly privileged user of the Moodle site, it can take a very long time to respond with a list of modifiable courses as every course in the system is individually permission checked and returned in the service response. In my test I've seen a 4.75min delay computing the response. However, with the improvements to efficiency in get_user_capability_course() with Moodle 3.4, the same result can be achieved much faster. My test: 3.5sec.

There's a commit in my fork which has the change that I'm currently evaluating, but as I haven't had an organisational CLA for my employer sent off yet, and thus no individual CLA either, it won't be accepted for merging.

Jonathon

@mrblippy
Copy link
Contributor Author

I will take a look at that commit today, thanks for the explanation @jonof

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants