plagiarism_plugin_pchkorg::get_links should be more efficient
danmarsden opened this issue · 1 comments
danmarsden commented
the function "get_links" can be called multiple times on a single page - particularly when a teacher is viewing a large number of submissions. For this reason you should be implementing some static vars.
Things like the following should only happen once per page load - no matter how many times get_links is called on a single page:
- Is pchk enabled.
- is pchk enabled for "This" module
- is_group_member - this one scare me - it makes an external curl call - what happens if that is failing? - does it kill the assignment grading page? - what happens when it fails and is called 50 times on the page?
JaneAdelmann commented
Static vars have been added.
In new version (3.2) Method is_group_member
will be called only once and maximum timeout is 2 seconds.