Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0
-
Component/s: Performance
-
Labels:None
-
Difficulty:Easy
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
I just noticed some modules call $DB->get_record() inside their {modname}_extend_settings_navigation() and I think it is not necessary. For example, mod/glossary does not need this as its id can be taken from $PAGE->cm->instance. If this is common case, it saves us at least one query per every module in the course.
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Thanks for spotting this wasted DB query David. I have now gone through all of the modules and ensured all DB queries were required and cleaned up any where we already had the required information.