MDL-64783 analytics: Performance improvements
authorDavid MonllaĆ³ <davidm@moodle.com>
Wed, 3 Apr 2019 17:46:03 +0000 (19:46 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 8 Apr 2019 22:29:57 +0000 (00:29 +0200)
commitfccc728fcce547f8deb5a5701a85f05bbe5dbac1
treeef028d5bd321fa94568da68a5d560e123e8abb22
parent02dfbf44a74cd86ce3fe159b0b646d77833da09f
MDL-64783 analytics: Performance improvements

- Removed redundant query to analytics_predict_samples
- Analysers API now uses recordsets to iterate through the analysable
  elements. They take the last analysed time into account.
- New method for targets so there is no need to always update the last
  analysis time. Useful for lightweight targets.
18 files changed:
admin/tool/analytics/classes/output/invalid_analysables.php
analytics/classes/analysable.php
analytics/classes/analysis.php
analytics/classes/course.php
analytics/classes/local/analyser/base.php
analytics/classes/local/analyser/by_course.php
analytics/classes/local/analyser/sitewide.php
analytics/classes/local/target/base.php
analytics/classes/local/time_splitting/base.php
analytics/classes/manager.php
analytics/classes/user.php
analytics/tests/fixtures/test_analysis.php
analytics/tests/model_test.php
analytics/upgrade.txt
lib/classes/analytics/analyser/users.php
lib/tests/analysers_test.php
lib/tests/fixtures/deprecated_analyser.php [new file with mode: 0644]
user/classes/analytics/target/upcoming_activities_due.php