This code is pretty much done now, patch to follow soon...
PERFORMANCE TESTING RESULTS
Course setup:
- No blocks except Administration
- 5 forums (all default settings, named 1..5)
- 5 quizzes (ditto)
Test procedure:
1) Clear cookies
2) Load the course URL view.php?id=x
3) Log in
(course view page appears)
4) Look at perfinfo for numbers (I hacked perfinfo so it would appear when logged in as student).
http://sm449.vledev.open.ac.uk/coremoodle/course/view.php?id=5
and log in.
All results show the first page load, then the result if I immediately click 'Reload' in browser (or repeatedly click Reload), ie the result after caching data in session.
The first page load varies randomly a bit, I think depending on how long since I last did an access with that user, sorry. Couldn't be bothered to repeat tests etc. There was no difference to behaviour with editing on/off.
Patch not installed...
[STUDENT] 29/3; 24/0
[ADMIN] 31/2; 27/0
Patch installed, global switch $CFG->enableavailability off...
[STUDENT] 28/3; 23/0
[ADMIN] 30/2; 26/0
(note this is 1 query faster because I made a performance enhancement that was necessary for some of the other changes to work)
Patch installed, global option on...
[STUDENT] 31/3; 23/0
[ADMIN] 30/0; 26/0
Patch installed, 1 completion condition...
[STUDENT] 28/3; 23/0
2 completion conditions...
[STUDENT] 27/2; 23/0
1 grade condition...
[STUDENT] 28/2; 23/0
2 grade conditions...
[STUDENT] 28/2; 23/0
2grade and 2 completion...
[STUDENT] 28/2; 23/0
I think there should be up to 2 extra queries (1 for grades, 1 for completion info) in the first request, however these are not showing up in the results - probably because the existing completion system was turned on in any case and always retrieves the completion info [dunno about grades though].
Anyhow there doesn't seem to be any particular cause to worry about performance.
Hi Sam,
I wondered how this was coming along?
Would it be worth considering adding Boolean ORs in addition to ANDs and to include conditions based on user and group?
Cheers,
James