currently modules can inadvertently load all other modules during the bootstrap. this is easy to do by calling a node_load() or module_invoke_all(). this degrades performance for anonymous users when caching is enabled.
with this patch, the module writer will see an php error like "Call to undefined function: drupal_set_html_head()" if this is attempted. basically, unavailable functions are actually reported as unavailable. this patch is only 1 line long, and probably worthy of 4.6 consideration. If it goes in for 4.7, that would be OK with me too.
in order to test this patch, you could view a cached page as anonymous when an offending modeule is enabled (e.g. sections.module, taxonomy_context.module, etc.). I will help fix all these modules after this patch is accepted.
Comment | File | Size | Author |
---|---|---|---|
module_list.patch | 1.02 KB | moshe weitzman | |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedJust in case someone thinks this isn't a significant problem, have a look at this scan of the Contrib repos. Some of these modules are not breaking the bootstrap, but sure many are.
Comment #2
Prometheus6 CreditAttribution: Prometheus6 commentedFor the record:
You can take these off the list.
Comment #3
Dries CreditAttribution: Dries commentedI like this patch. Committed to HEAD for inclusion in Drupal 4.6! I'm marking this 'active' until the modules have been fixed.
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedmodules that misuse this hook simply won't work anymore. marking this as fixed.
Comment #5
(not verified) CreditAttribution: commentedComment #6
TomChiverton CreditAttribution: TomChiverton commentedIf I'm right at figuring out what is up, any chance of fixing quicktags (http://drupal.org/node/16826) for 4.5(.7) ?