moodle28 load of many not relevant information

moodle28 load of many not relevant information

autor Raphael Goldman -
Počet odpovědí: 2

Hi,

I am using flexi sections in our big courses.

In course/view.php for the file include the format.php the page load any information it has about the course modules and types:

    $modinfo = get_fast_modinfo($course);

    $modnames = get_module_types_names();

    $modnamesplural = get_module_types_names(true);

    $modnamesused = $modinfo->get_used_module_names();

    $mods = $modinfo->get_cms();

    $sections = $modinfo->get_section_info_all();

I think that this is slowing the course load time,

IS there anyway yo change it to make it load faster?

Thanks,

Raphael

Průměr hodnocení: -
V odpovědi na Raphael Goldman

Re: moodle28 load of many not relevant information

autor Davo Smith -
Obrázek: Core developers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers

Have you run some profiling on this code to determine that it is the cause of the slow page load? ( https://docs.moodle.org/dev/Setting_up_xhprof_on_Moodle
http://tjhunt.blogspot.co.uk/2013/05/performance-testing-moodle.html )

If you have and this is the main bottleneck, then I am surprised, as most of those calls are fairly lightweight (get_fast_modinfo should come straight from the cache in 99% of situations, get_module_types_names is a single DB query, the first time it is called on a page; all the rest of the calls to the modinfo object are working with data already in memory).


V odpovědi na Davo Smith

תשובה ל: Re: moodle28 load of many not relevant information

autor Raphael Goldman -

Thanks a lot!

I am using xhprof

Can you please give some points that may impact on the loading time of the main course page.

I have thought about those points:

  • Numbers of activity in course
  • number of blocks in the course
  • Using of pictures and video in main page.
  • number of users in course?