I am a new Moodle user. Recently I've downloaded and installed the latest version (1.8.2) and found out that it works too slow on my server (Windows 2003, Apache 2.2, PHP 5.2, MySQL 5.0) even when no other resource-consuming tasks were running.
After a little investigastion I found a function get_list_of_timezones() in file admin\settings\location.php. It is called from this file twice and each time it takes about 1.7 seconds on my computer to complete it. So, 3.4 seconds (out of 9.1 which is needed to load the whole page with courses) for every user on most pages is just a waste of time. You can test it by editing the file admin\settings\location.php. Find the string
$options = get_list_of_timezones();
put before this string
$time_start = microtime(true);
and after this string
$time_end = microtime(true);
$time_total = $time_end - $time_start;
echo "Time total: $time_total seconds<br>";
The second call of this function is not needed at all and I've found that Samuli Karevaara already put this issue in the tracker (http://tracker.moodle.org/browse/MDL-8451). But somehow this issue is considered minor (though if we call this function once, not twice, we already have pages loading 15 % faster) and after 5 months there is no any progress.
Maybe someone more experienced can tell me if it is possible to do without this function at all? What for do we need all the timezones every time? If it is still a necessity maybe this function can be optimized much better than just removing its second call in location.php? I can look further into the get_string() function (which is called inside of get_list_of_timezones() many times in a cycle) because it seems that optimizing it we can get much more gain in performance for it is used in many other calls.
Thank you for your patience
