The context for this is that when the OU tested Moodle 2.4, we found that it was too slow, so we have been looking for possible performance information. If you want a longer version of the story, see http://tjhunt.blogspot.co.uk/2013/05/performance-testing-moodle.html.
One thing that sam marshall noticed was that if your theme overrides several renderers, it is pretty inefficient. All the renderers get included in the renderers.php file of your theme, and that means that all those renderers have to be loaded on every page. And so all the base renderers like mod_quiz_renderer, and hence all the quiz code, gets loaded on every page, whether it is required or not.
So, in MDL-39590 I am suggesting an alternative. Instead of a single renderers.php file, we will instead have a renderers folder in the theme, containing files like
- core_renderer.php
- mod_choice_renderer.php
- theme_mymobile_renderer.php
(to use the one in the mymobile theme as an example). The logic there is that the filename is the name of the base renderrer you are overriding.
In the OU theme, where we have 11 overridden renderers, that saves us 20ms, which may not sound like a lot, but that was a 2% speed-up in loading the particular page I was testing.
If your theme does not contain a renderers folder, but does contain a renderers.php file, then this change will not break it. We will go on loading the renderers.php.
The problem is themes like bootstrapbase and mymobile, where there is a renderers folder, but it does not contain files with the right names. I have fixed that, but it shows that this change was not 100% backwards compatible, as I had hoped it would be.
I think that switching from a single huge renderers.php file, to a set of separate renderers/component_name_renderer.php files, will also make things easier to work with.
Anyway, what I think is not important. You are the folks who will be affected by this, which is why I am posting here. What do you think of this proposed change?