admin settings why reading all settings tree : performance problems

admin settings why reading all settings tree : performance problems

by Céline Perves -
Number of replies: 1
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

while customizing our plateform on moodle 2.4.x, We,ve got big performance troubles with admin settings pages due to the following facts :

  • while calling admin/settings.php for a given section code is loading all setting tree threw admin_get_root (line 18), so pass to all settings pages of all plugins
  • in two of this settings page, the method make_category_list is called one or more time

since we have a big amount of categories and a structuer with parents (depth 3), loading a setting page became very too long

My question , is it absolutely obvious to read all setting tree, can't we load a partial tree?

Thank you

Céline

Average of ratings: -
In reply to Céline Perves

Re: admin settings why reading all settings tree : performance problems

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It only does this  if you are logged in as admin.

If you are using a php accellerator, including all the settings.php is not that big a deal.

Calling a method like make_category_list in a settings.php file is stupid, and a bug, and should not be done. If it is not already in the tracker, please report it. Ah, I see you did: MDL-39376 smile