ndunand / moodle-mod_choicegroup

Moodle "Group Choice" plugin
https://moodle.org/plugins/mod_choicegroup
34 stars 57 forks source link

performance issues ? #89

Closed ndunand closed 8 years ago

ndunand commented 8 years ago

Possible performance issues, as reported by Sara Cenni on the Moodle.org plugin page.

A quick test with 2000 students revealed no big performance issues, below is the profiling callgraph for the mod/choicegroup/report.php page (displaying users with no response), seeming to indicate the bottleneck to be calculating all users' names for display.

mod_choicegroup-report php_callgraph

s-cenni commented 8 years ago

Hi Nicolas, This is my profiling callgraph for mod/choicegroup/view.php with a course with 3647 users.

3647

Below the report with 1547 users

1547

ndunand commented 8 years ago

Thanks for the callgraphs. Yes indeed, the choicegroup_get_user_answer (called once per enrolled user) seems to be the bottleneck here, as you supposed initially.

ndunand commented 8 years ago

What about trying to implement the code modification you were talking about? Is this something you could do? If it proves a real improvement and passes all tests, I'd be glad to include it.

s-cenni commented 8 years ago

I thought about your proposal, but unfortunately in these weeks I'm too busy to study the plugin code and to implement the code modification. :( In the near future I hope I have enough time to implement it because we really appreciate your plugin and we found it very useful!! Thank you! Sara

ndunand commented 8 years ago

Alright, thanks for posting back. I'm leaving this open so that we can report back here later on.

bonimat commented 8 years ago

I'm Sara's collegue . We spoke about the problem few weeks ago, and we have worked on a potential solution. Do you prefer receive my code by email or do I have to post it in this forum?

ndunand commented 8 years ago

Hi. Thanks, the best for me would be that you initiate a pull request, so I could easily review the changes. See the documentation here: https://help.github.com/articles/using-pull-requests/

ndunand commented 8 years ago

Addresses by https://github.com/ndunand/moodle-mod_choicegroup/pull/90